Textarea contenteditable

contenteditable, html, textarea

Solution

Have you set the right doctype at the top of your page? For HTML5 you need the following doctype:

<!DOCTYPE html>

Also, why a textarea? textareas are already editable.

Problem

I am trying to make a textarea content editable and I am failing. I am using this code: ``` <textarea id='' class='' name='notes' rows='12' cols='67' contenteditable='true' ></textarea> ``` I am expecting a result like http://html5demos.com/contenteditable Does anyone have an idea why it's not working? Edit: I am doing this because I am trying to do a oneliner to add a control to a form in which (HTML) formatted content can be pasted and retain its formatting. I am trying to do this without fuss and without javascript code. It appears this is not possible. I will close this question in a day if no further input to the contrary is added.

Original source