vBulletin want add CKEditor next time *yeah* So I want upgrade my site from textarea to CKEditor too. I have downloaded last version and test the api.html example and found a big problem with CKEditor. I need custom buttons here (not for the forum), but the insertHTML will not working with it.
Example:
Starting with:
Now select "value" and execute:
The Result is
You see, value is not bold anymore. Why? insertHTML removes styling informations of selected text. That is not fine. Is there a workaround? What is my mistake? Can you help me?
Example:
Starting with:
<strong>Initial value</strong>
Code:
editor.insertHtml('<span style="color:red;">'+selectedText+'</span>');
<strong>Initial </strong><span style="color:red;">value</span><strong>.</strong>
Comment