Hi,
i am using the following code to change the src Attribute of an image:
var url = 'pathToImage';
CKEDITOR.instances['pageContentEdit'].getSelection().getSelectedElement().$.src = url;
The image changes immediatly, but if i switch to source-mode and back to wysiwyg, the old image is shown. So the sourcecode is not updated, if i change an attribute with the method above.
How can i do that? I found no method to update the sourcecode after changing an element? Is there anything to do that? Or do i have to change the element with another method?
Thank you very much
Greetings
ahooge
You need to set it like this:
You need to set it like this: