I want to create a bookmarklet that sets the page to be editable, that is, to run this code:
javascript:document.body.contentEditable=true;
When I made a bookmark of that, I could see that the page becomes editable very briefly and then the whole thing is replaced with the word "true".
Bookmarklets have to evaluate to void for the browser stay on the same page. Just end it with a void(0)
:
javascript:document.body.contentEditable=true;void(0);