Hi,
my plugin is inserting an html snippet (editor.insertHtml() ) like:
<div> <a...> <div> <img> <span>...</span>...<span>...</span>.. </div> </a> </div>
but i see that after insertion, the editor is converting above into:
<div> <div> <a...> <img> <span>...</span>...<span>...</span>.. </a> </div> </div>
Notice the re-arrangment of divs around anchor.
How to stop this behavior or tell editor not to re-arrange elements.
I understand it may be desired in some cases like when user tries to put a non-valid html source etc, but from a plugin?
Not sure what wrong the editor sees with the first one, since its working good in browser?
Thanks for your help.

Before HTML5 links could not
Before HTML5 links could not contain block elements like <div>. Since HTML5 this is possible, but it's a big semantical change which we didn't yet made in CKEditor, becuase it has huge impact on many features. Full HTML5 support is planned, but for now you cannot force CKEditor to have links with block elements inside them.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Using alternative now
Thanks Reinmar. I just searched for alternative and its (span with block display) working good.