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.
document.designMode="on"
Credit:
Top comments (9)
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?
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...
Dude, I'm so grateful for you sharing this awesome feature!
Same here, I really found this property super useful.
BTW, this is not just for Chrome. It works basically with any browser, including IE6!
caniuse.com/mdn-api_document_desig...
Hey, glad you've liked it so much to spread the word 💪
And I appreciate crediting me :)
I really was amazed when I see your tweet, so all the credit is for you for sharing that with us. Thanks.
whaaaaattt :o
Wow! Didn't even no about it!