<!DOCTYPE html> <html> <style> :-moz-read-only { color: red; } :-moz-read-write { color: green; } </style> <body onload="document.designMode='on';document.designMode='off'"> <div contenteditable>test</div> </body> </html>