Questions tagged [contenteditable]

contentEditable is an HTML attribute (invented by Microsoft and standardized in HTML5) that is used for client-side in-browser "rich text" editing.

There are really two attributes involved, designMode and contentEditable. The designMode attribute governs the entire document (i.e. it makes the entire document editable, like a dedicated HTML editor). The contentEditable attribute governs just the element on which it appears, and that element's children -- like a rich text editor control within a page.

Resources

2552 questions
33
votes
4 answers

Why is contenteditable not a style?

I was recently fiddling with contenteditable in a webpage and got irritated when I needed to set a large number of span tags with it (I ended up using JavaScript to do it). If only I could set it via CSS... Does anyone know the rationale behind why…
Vanwaril
  • 7,380
  • 6
  • 33
  • 47
32
votes
12 answers
32
votes
9 answers

Prevent Chrome from wrapping contents of joined

with a

I have observed an undesirable behaviour in Chrome that occurs when one joins two

's by deleting the separation between them. Although the

tags are joined properly, Chrome wraps the right-most

tag's content with a . Edit: this…

Michael Robinson
  • 29,278
  • 12
  • 104
  • 130
32
votes
2 answers

Contenteditable div vs. iframe in making a rich-text/wysiwyg editor

i'm trying to weigh the pros and cons of using a
vs.