The contenteditable attribute looks so wonderful for something like a comment box for websites, doesn't it? It shows all the formatting, unlike inputs, so, is it possible? is it smart? I saw that IE doesn't support it? Would it be easy to create a fallback input to show if the browser doesn't support contenteditable?
good idea or bad?
I think the trick is checking whether the browser supports it.. Current versions of most modern desktop browsers seem to support it just fine (though they do so differently, and with different commands), but mobile browsers I've checked have issues. Because they simply behave incorrectly while offering all of the same attributes and functions as their desktop counterparts, figuring out whether it's truly supported is tricky. So, if it's something simple like a comment form where formatting might be nice to have but isn't strictly necessary, probably more trouble than it's worth.
That said, adding contenteditable areas using progressive enhancement to replace textareas seems to work very nicely, so you can definitely provide a fallback.. if you can figure out whether the browser needs it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With