Opened 13 years ago
Closed 13 years ago
#8657 closed Bug (invalid)
Using insertHtml within a formatted span tag splits it into two and inserted HTML doesn't get formatted
Reported by: | adsharp | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6.2 |
Keywords: | Cc: | adam.sharp@… |
Description
Browser: Safari, Firefox OS: Max OS X 10.7.2
To reproduce:
- Start with an empty CKEditor instance
- Type in some text
- Format the text as Arial 12px
- Move the cursor somewhere in the middle
- Call CKEditor.instances.editor.insertHtml("<b>Hello, world</b>")
Result:
<span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">This is </span></span> <b>Hello, world</b> <!-- span was split in two and this inserted between --> <span style="font-size:12px;"><span style="font-family: arial,helvetica,sans-serif;"> some text</span></span>
Change History (2)
comment:1 Changed 13 years ago by
Cc: | adam.sharp@… added |
---|
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
This is how insertHTML works. I CKEditor had modified inserted HTML that would be a real bug.
For that you should rather use PasteAsPlainText plugin or
CKEDITOR.instances.editor1.insertText("Hello, world");
There is a little problem with this option however - I have reported it here #8722.