Use contentEditable from root window
Better error handling