I have a button in my page and when i do click that button i call:
editor.insertElement(link);
When i do that it inserts the HTML correctly in the editor, but when i do any changes (ex: click show source-code button) the HTML code that I inserted is lost. Is there any command to persist my code to the CKEDITOR?
Found the answer. I had to set config allowedContent to allow links.