Opened 13 years ago
Closed 13 years ago
#9375 closed Bug (fixed)
target.insertHtml is not working properly
| Reported by: | yveszx | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | 4.0 Beta |
| Keywords: | Cc: |
Description
when you use target.insertHtml("somehtml"); the editor will remember what was inserted earlier and will load it again !
how to replicate :
insert an image in a blank document, select all and delete (Blank page now) then use a custom plugin that inserts some html
final_html = '<a class="glossary" href="glossary.aspx" target="_blank"> link </a>';
target.focus();
target.insertHtml(final_html);
And the image will be back...
The trace goes on, if you insert an image, then table and delete all and run the code above you will get everything back !
Change History (3)
comment:1 Changed 13 years ago by
| Status: | new → pending |
|---|
comment:2 Changed 13 years ago by
Downloaded the nightly build and everything seems to be working fine !
I will continue testing using the nightly build.
Yves
comment:3 Changed 13 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | pending → closed |

I think there is something clearly wrong with your plugin or the problem has expired on trunk. I have tried similar TC and nothing like that happened.
CKEDITOR.instances.editor1.insertHtml('<img alt="" src="http://a.cksource.com/c/1/inc/img/demo-little-red.jpg" style="width: 120px; height: 168px;" />');CKEDITOR.instances.editor1.focus(); CKEDITOR.instances.editor1.insertHtml('<a class="glossary" href="glossary.aspx" target="_blank"> link </a>');@yveszx could you try the above TC or your plugin with latest nightly (http://nightly-v4.ckeditor.com/) or master version (https://github.com/ckeditor/ckeditor-dev.git) and see if problem still occurs?
Waiting for your comments.