Enabling the HTML design mode on the fly in the browser with JavaScript
Published on 2024-03-24 • Modified on 2024-03-24
This snippet shows how to enable the HTML design mode on the fly in the browser with JavaScript. You must open the browser console (F12 with Firefox), then enter the following command in the console () tab of the developer tools bar. It is useful when testing text on a page without modifying the code or wanting to enter bizarre texts on websites for fun! 😜
document.designMode = 'on'
// or
// document.body.contentEditable = true
More on Stackoverflow Read the doc More on the web Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉
