Skip to content

Commit 76c9884

Browse files
committed
enable design mode on the document
1 parent 23d5a0f commit 76c9884

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ function sidebarOthers()
9696
{text: "VitePress 初始化", link: "/others/vitepress/getting-started"},
9797
{text: "获取 git 提交的所有文件", link: "/others/git/get-all-files-submitted-by-git"},
9898
{text: "git 别名", link: "/others/git/bash-alias"},
99+
{text: "在网页上启用设计模式", link: "/others/enable-design-mode-on-the-document"},
99100
]
100101
}
101102
];
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 在网页上启用设计模式
2+
3+
只需在浏览器控制台中运行以下命令,就可以编辑当前打开的网页内容。
4+
5+
```javascript
6+
document.designMode = 'on'; // 启用
7+
document.designMode = 'off'; // 禁用
8+
```

0 commit comments

Comments
 (0)