mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Add Make The Browser Editable With Design Mode as a javascript til
This commit is contained in:
15
javascript/make-the-browser-editable-with-design-mode.md
Normal file
15
javascript/make-the-browser-editable-with-design-mode.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Make The Browser Editable With Design Mode
|
||||
|
||||
Modern browsers support a Web API called _Design Mode_. When you turn on
|
||||
_Design Mode_, you are able to edit the text on the web page like you would do
|
||||
in Word or Dreamweaver. This is a great way to experiment with copy.
|
||||
|
||||
By default it is `"off"`, but you can turn it on from your browser's devtools
|
||||
console.
|
||||
|
||||
```
|
||||
> document.designMode = "on"
|
||||
"on"
|
||||
```
|
||||
|
||||
[source](https://developer.mozilla.org/en-US/docs/Web/API/Document/designMode)
|
||||
Reference in New Issue
Block a user