Hi all,
I have problem :
I used to createFakeElement image
And then i insert it into content of CKEDITOR :
===> insert is OK. After that, i click "source" button on toolbar CKEDITOR. It will disappear(seems as oFakeNode has been removed). When i click source again to comeback, image was lost property as src, name,...
Plz, anybody can help me to fix this! Thanks a lots of.
I have problem :
I used to createFakeElement image
var realElement = CKEDITOR.document.createElement("IMG");
var oFakeNode = CKEDITOR.TEST.createFakeElement(realElement, 'cke_flash', 'flash', true);And then i insert it into content of CKEDITOR :
CKEDITOR.TEST.insertElement(oFakeNode);
===> insert is OK. After that, i click "source" button on toolbar CKEDITOR. It will disappear(seems as oFakeNode has been removed). When i click source again to comeback, image was lost property as src, name,...
Plz, anybody can help me to fix this! Thanks a lots of.

Re: createFakeElement Image has been lost when click source
viewtopic.php?f=11&t=16252
Re: createFakeElement Image has been lost when click source
Re: createFakeElement Image has been lost when click source
If you have an tag, than it should look something similar to the following:
afterInit : function( editor ) { // Register a filter to displaying placeholders after mode change. var dataProcessor = editor.dataProcessor, dataFilter = dataProcessor && dataProcessor.dataFilter; if ( dataFilter ) { dataFilter.addRules( { elements : { 'cke:object' : function( element ) { var attributes = element.attributes; if ( attributes.name && !attributes.href ) return editor.createFakeParserElement( element, 'cke_variables', 'variables' ); } } }); } }Re: createFakeElement Image has been lost when click source
Maybe, It's my problem. Is there any ideas for this? When i createFakeElement and insert to CKEDITOR, after switch "Source" or WYSIWYG will not lose properties of element.