Created
October 25, 2022 21:36
-
-
Save DaCuteRaccoon/2b7214100f785c78c57293adc6c7e133 to your computer and use it in GitHub Desktop.
Toggle between editing and viewing a website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (document.body.contentEditable == 'inherit' && document.designMode == 'off') { | |
document.body.contentEditable = true; | |
document.designMode = 'on'; | |
void 0; | |
} else { | |
document.body.contentEditable = 'inherit'; | |
document.designMode='off'; | |
void 0; | |
} |
Author
DaCuteRaccoon
commented
Oct 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment