Opened 14 years ago
Last modified 14 years ago
#6856 confirmed Bug
Inserting span tag - wrapped content with insertHTML appends after ending <p> tag instead of inside.
Reported by: | Zac | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Read-only | Version: | 3.3 |
Keywords: | Webkit | Cc: |
Description
Occurs in Safari 5.0.3 for Mac OS 10.6.5
When using the method editor.insertHtml() to insert content that is wrapped in a <span> tag, the content is not inserted into the location where the cursor resides. It inserts the content OUTSIDE of the next available ending </p> tag.
This makes it impossible to insert content wrapped in a span (non-block level) tag on the same line as existing content in the editor.
To replicate:
Use a plugin which installs a menu into the Editor toolbar, such as richcombo plugin. The plugin should use editor.insertHtml() to insert content. The content to be inserted by the menu item should be wrapped in span tags like:
<span>some content</span>
Within a new editor instance, first type a single word but do not hit return. Select the menu item from the toolbar that uses editor.insertHTML() to insert content wrapped in a simple span tag. Notice that the content is inserted on a new line, not next to the word. Click the Source toolbar button. Notice that the span tag is inserted after the closing </p> tag.
Attachments (1)
Change History (3)
Changed 14 years ago by
Attachment: | Screen shot 2010-12-14 at 4.49.24 PM.png added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Component: | General → Core : Read-only |
---|---|
Keywords: | Webkit added |
Status: | new → confirmed |
Version: | 3.4.2 → 3.3 |
A browser intrinsic bug unfortunately.
Correction:
This problem only occurs if the span tag contains the attribute contenteditable="false". It does not occur if the span does not include this attribute.