Opened 14 years ago
Last modified 13 years ago
#6143 confirmed Bug
Fakeobjects element inserted inside paragraph
Reported by: | Richard Waite | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
I'm using fakeobjects in a custom plugin. This plugin creates a div element, which is inserted as a fake element in the editor.
Problem is that the fake element is an image, so using 'editor.insertElement()' function inserts the element inside a paragraph, when it should be inserted outside the currently selected element.
To reproduce you can try the below code:
When you press undo while inside paragraph, new div will be inserted into paragraph instead of splitting it in two.
Currently we don't have support for block-level fake elements.
@richardw - pagebreak plugin seems to do something similar to what you want\wanted to achieve. Perhaps you will find something useful there.
Another option would be adding "DOM structure awareness" to the plugin.