document.designMode controls whether the entire document is editable.
document.designMode
MDN Reference