https://github.com/msankhala/editable-bookmarklet
Editable bookmarklet to toggle any webpage to be editable.
https://github.com/msankhala/editable-bookmarklet
bookmarklets editable
Last synced: 8 months ago
JSON representation
Editable bookmarklet to toggle any webpage to be editable.
- Host: GitHub
- URL: https://github.com/msankhala/editable-bookmarklet
- Owner: msankhala
- Created: 2018-06-23T06:44:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-23T06:54:33.000Z (almost 8 years ago)
- Last Synced: 2025-03-25T01:26:15.697Z (about 1 year ago)
- Topics: bookmarklets, editable
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Make any webpage editable
---------------------------
You can make any web page editable if you copy and paste this code in your browser's address bar.
```javascript
javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0
```
If you use chrome and copy this code then chrome may strip the leading `javascript:` for secuirty purpose.
What if you can make a bookmarklet of this code which will toggle the page to be editable and non editable. Here is the code of that bookmarklet.
```javascript
javascript:(function() {
if (document.body.contentEditable === 'false' || document.body.contentEditable === 'inherit') {
document.body.contentEditable = 'true'; document.designMode='on';
} else {
document.body.contentEditable = 'false'; document.designMode='off';
}
})()
```
**Select this code and drag and drop in your bookmark bar and give appropriate name to this bookmarklet. Let the toggle begin :)**