DEV Community

loading...
Cover image for Edit Your Website Live In Google Chrome by using document.designMode

Edit Your Website Live In Google Chrome by using document.designMode

arbaoui_mehdi profile image Arbaoui Mehdi 🇲🇦 ・1 min read

I was on my twitter, reading stuff, then suddenly I see a tweet which shows a cool feature that I never thought exist, this feature is document.designMode which allows you editing the entire document directly, this property is set by default to off, let's change it to on and see the MAGIC HAPPENS.

Google Chrome document.designMode

document.designMode="on"

Credit:

Discussion (8)

pic
Editor guide
Collapse
andrebclark profile image
Andre

I was expecting something like visbug. this feature feels more like a content editing mode than a 'design' mode. is there anything more you can do to this besides change text? what is the use case where this is actually helpful? I don't mean to be a contrarian, but what am I missing?

Collapse
arbaoui_mehdi profile image
Arbaoui Mehdi 🇲🇦 Author

Sometimes long words can break the design, so document.designMode can be used to tweak the design in the Browser. This is an interesting article that go through some use cases of this feature:

css-tricks.com/using-devtools-twea...

Collapse
raymag profile image
Carlos Magno

Dude, I'm so grateful for you sharing this awesome feature!

Collapse
arbaoui_mehdi profile image
Arbaoui Mehdi 🇲🇦 Author

Same here, I really found this property super useful.

Collapse
sulco profile image
Tomek Sułkowski

Hey, glad you've liked it so much to spread the word 💪

And I appreciate crediting me :)

Collapse
arbaoui_mehdi profile image
Arbaoui Mehdi 🇲🇦 Author

I really was amazed when I see your tweet, so all the credit is for you for sharing that with us. Thanks.

Collapse
saurabhdaware profile image
Collapse
iamarsenibragimov profile image
Arsen Ibragimov

Wow! Didn't even no about it!