Hi,
I am trying to create a plugin for CKEditor that adds a custom object with children.
Example:
<div> <img src="someimage.jpg" /> <p> Some text <span>Some subtext</span> </p> <img src="someStaticImage.jpg" /> </div>
In the onOk function i have:
---snip--- this.imgElement.setAttribute('src',path + data.imageSrc); this.staticImgElement.setAttribute('src',path + 'images/staticimg.jpg'); this.imgElement.appendTo(this.element); this.imgElement.appendTo(this.element); this.staticImgElement.appendTo(this.element); ---snip---
I would like for this block to behave as a single element, meaning that pressing backspace deletes the whole block, double clicking on it opens the edit dialog...
Any idea how i could do that?
I came close with setting
this.element.setAttribute('contenteditable','false');
However this doesn't allow content to be inserted before "it", if "it" was the first element in the ckedit window.