Hello,
I've created a custom button and I want it to insert a DIV wrapping an A for the purpose of my custom flash player. The syntax is as following:
<div id="CUSTOM_ID"><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></div>
So I made a rather simple custom button that displays a dialog with an input box for entering the custom id. The code is inserted into the editor with the insertHtml function like that:
editor.insertHtml( '<div id="'+cid+'2009"><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></div>' )
I've just discovered CKEditor the other day and I don't know how it works exactly.
My problem with insertHtml is that it would strip the DIV tag and replace it with a SPAN with a class Apple-style-span.
And all I want is that my code gets inserted without any change at all.
How can I do that?
edit:
Turns out this only happens when using Google Chrome (mine is version 4.1.*) and I guess the Apple-style-span comes from Chrome's Apple Webkit.
insertHtml works in Firefox (3.6.3) which is good enough for me for now.