Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
WYSIWYG any webpage bookmarklet
3 points by crizCraig on Jan 24, 2011 | hide | past | favorite | 1 comment
javascript:(function(){document.designMode = document.designMode === "on"? "off":"on"})();

Toggles between edit/non-edit mode.

This is good for quick iterating on wording while developing or responding to feedback. Also good for tripping people out with news headlines that have their name inserted into them.



There is an alternate syntax that I'm not recalling at the moment; I used to have a bookmarklet at hand for it before I had to rebuild. I seem to recall that it was a bit more robust. Also, you don't want to reverse the selection in the ternary operator, as the value may read as... undefined, or empty string (I forget which) until it has been set to "on" (or actually set, to "off").

Really, what I wanted to mention is that this is a super-quick way to do a simple spell check against a live page. Flip on edit mode, and look for the squiggly underlines.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: