Hello,
I am try to write a plugin for CKEditor, but maybe there are two problem when I use "insertHtml" to insert <img> and <a> tags:
1. I cannot insert a tag with title:
editor.insertHtml('<a href="http://google.com" title="Something">Google</a>');
The generated code is:
<a href="http://google.com">Google</a> (title attribute doesn't appear)
2. I cannot insert <img> and <a> tags when I remove the default "image" and "link" plugin:
Because of some reasons, I want to replace the default "image" and "link" button on toolbar, but my plugin cannot insert <img> and <a> tags when I remove the default plugins.
Are there some solutions for me ? Thank you very much.
Solved!
I've solved the problem, just create an element by CKEDITOR.dom.element.createFromHtml and insert this to editor by using editor.insertElement