[whatwg] Proposal: Undeletable elements within contentEditable
dimich at chromium.org
Thu Jun 24 10:49:40 PDT 2010
It would be nice to know more details on how you are thinking to use this
and why this is very useful for code editors. If I select all my code and
hit Delete, don't I want to remove all the code, together with highlighting?
On Thu, Jun 24, 2010 at 9:08 AM, Nikita Vasilyev <me at elv1s.ru> wrote:
> The current version of spec
> does not define any way to make an element within contentEditable
> undeletable. I propose "undeletable" attribute:
> element.undeletable = "true" | "false"
> How should it work:
> <div contenteditable>
> <span undeletable>foo</span>
> When I focus on the div, select all the text, and delete it, the span
> element MUST be empty, but MUST NOT be deleted.
> This behavior would be very useful while building code editors. I'm
> building CSS editor with syntax highlighting and auto-completion based on
> contentEditable. "undeletable" attribute would help me a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg