4 ms·
From the description (“make any website editable inline”), I expected this to be a browser extension or similar that would allow you to change the content on an
by chrismorgan 6y ago
From the description (“make any website editable inline”), I expected this to be a browser extension or similar that would allow you to change the content on any website. I find instead that it’s a CMS sort of thing, and is just a way of editing content on sites that you control and set it up on.
But in case anyone wants the other:
document.designMode = 'on'
It’s pretty cool. Basically it makes the whole page a contenteditable. Many years ago browsers had more involved UI wrapped around design mode (which was also exposed in the menu), with a formatting toolbars and such.
- imshashank 6y agoAs a kid, I used to love doing "document.designMode = 'on'"
- vldo 6y agoi have a bookmark for it: javascript:(function () %7Bdocument.designMode%3D'on'%7D)()
- askz 6y agoI actually have this one : javascript:(function () { document.designMode == 'on' ? document.designMode = 'off' : document.designMode = 'on';})()
- chrismorgan 6y agoJust so you know, the immediately-invoked function expression (IIFE) syntax is unnecessary here. This would do: javascript:document.designMode=document.designMode=='on'?'off':'on'
- efa 6y agoWow! 20 years doing web development and I never knew about this.
- hartator 6y agoLol same here. I was surprised `document.designMode = 'on'` worked!
- Wowfunhappy 6y agoBut then you can't do anything with the changes, right? Like Inspector, it's all lost when you reload the page.
- amelius 6y agoYou can still have JS running on the page, e.g. to periodically walk the DOM tree and save changes to disk.
- Wowfunhappy 6y agoHuh, clever! I wonder if anyone has built that.
- ceejayoz 6y ago> But then you can't do anything with the changes, right? You can screenshot it, and use it as "proof". I've seen people get scammed in this fashion - "he showed me screenshot of his bank balance!"
- XCSme 6y agoThere were a lot of people showing how they "hack" a long time ago using a similar command `document.body.contentEditable = true`, changing their PayPal balance to $9999, thus getting free money!
- cf 6y agoOh my god, I had the same thought and forgot how readily this features actually exists. I suppose I still like the idea of persisting those changes for websites I control but that's going to be way less straightforward.