MooTools Contenteditable

The contenteditable attribute is an enumerated attribute whose keywords are the empty string, true, and false. The empty string and the true keyword map to the true state. The false keyword maps to the false state. In addition, there is a third state, the inherit state, which is the missing value default (and the invalid value default).

http://blog.whatwg.org/the-road-to-html-5-contenteditable#what

Browser Support

  • Chrome4.0+
  • Safari3.1+
  • Mobile Safari5.0+
  • Firefox3.5+
  • Opera9.0+
  • Opera Mini/MobileN/A
  • Internet Explorer5.5+
  • Android3.0+
var ua = navigator.userAgent; var android_version = ua.match(/Android ([0-9.]+)/); var div = document.createElement(DIV); if( typeof(div.contentEditable) == undefined || (/(iPhone|iPod|iPad)/i.test(ua) && /OS [1-4]_d like Mac OS X/i.test(ua)) || (android_version!=null && parseFloat(android_version[1])<3 ) || (/(Opera Mobi)/i.test(ua)) ) { /* doesn't support contenteditable */ document.write('contenteditable <strong>not</strong> supported'); } else { /* supports contenteditable */ document.write('contenteditable <strong>is</strong> supported'); }