File tree Expand file tree Collapse file tree
packages/docs/fluent-editor/docs/demo Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77通过配置 ` counter ` 为 true,可以开启字符统计功能。
88
9- :::demo src=demos/counter.vue
10- :::
9+ <demo vue =" ../../demos/counter.vue " />
1110
1211## 最大字符数
1312
1413默认最大字符数为 500,通过配置 ` count ` 属性,可以自定义最大字符数。
1514
16- :::demo src=demos/counter-count.vue
17- :::
15+ <demo vue =" ../../demos/counter-count.vue " />
1816
1917## API
2018
Original file line number Diff line number Diff line change 1414
1515Quill 支持的工具栏: [ https://quilljs.com/docs/modules/toolbar ] ( https://quilljs.com/docs/modules/toolbar )
1616
17- :::demo src=demos/custom-toolbar.vue
18- :::
17+ <demo vue =" ../../demos/custom-toolbar.vue " />
Original file line number Diff line number Diff line change 44
55默认会处理视频与图片格式,其他格式统一被处理为文件显示
66
7- :::demo src=demos/file-upload.vue
8- :::
7+ <demo vue =" ../../demos/file-upload.vue " />
98
109## 服务器端上传
1110
1716
1817所以,如果上传四张图片,最终的结果应该是: edge 浏览器图标、chrome 浏览器图标、edge 浏览器图标、chrome 浏览器图标
1918
20- :::demo src=demos/file-upload-handle.vue
21- :::
19+ <demo vue =" ../../demos/file-upload-handle.vue " />
2220
2321## Options
2422
Original file line number Diff line number Diff line change 44
55选择一段文本后,单击格式刷按钮,再次选择另外一段文本可实现格式复制。双击后可多次粘贴格式,再次点击按钮退出。
66
7- :::demo src=demos/format-painter.vue
8- :::
7+ <demo vue =" ../../demos/format-painter.vue " />
Original file line number Diff line number Diff line change 88
99测试公式内容:e=mc^2
1010
11- :::demo src=demos/formula.vue
12- :::
11+ <demo vue =" ../../demos/formula.vue " />
1312
1413## 化学公式
1514
1615` KaTex ` 包导出了 ` mhchem ` . 又因为 Quill 的公式基于 ` KaTex ` 所以可以直接在顶部导入 ` katex/contrib/mhchem/mhchem ` 即可启用化学功能.
1716
1817测试公式: ` \ce{x Na(NH4)HPO4 ->[\Delta] (NaPO3)_x + x NH3 ^ + x H2O} `
1918
20- :::demo src=demos/formula-chemistry.vue
21- :::
19+ <demo vue =" ../../demos/formula-chemistry.vue " />
2220
2321## 可编辑公式
2422
@@ -50,5 +48,4 @@ import 'mathlive/fonts.css'
5048` 0.104.0 ` 及以上版本的 ` mathlive ` 存在公式编辑面板闪退问题,请使用 ` 0.103.0 ` 及以下版本。
5149:::
5250
53- :::demo src=demos/formula-mathlive.vue
54- :::
51+ <demo vue =" ../../demos/formula-mathlive.vue " />
Original file line number Diff line number Diff line change 66
77测试视频链接:[ https://media.w3.org/2010/05/sintel/trailer.mp4 ] ( https://media.w3.org/2010/05/sintel/trailer.mp4 )
88
9- :::demo src=demos/get-content-html.vue
10- :::
9+ <demo vue =" ../../demos/get-content-html.vue " />
1110
1211## 获取 Delta 内容
1312
1413通过调用 ` editor.getContents() ` 方法获取编辑器的 Delta 内容。
1514
16- :::demo src=demos/get-content-delta.vue
17- :::
15+ <demo vue =" ../../demos/get-content-delta.vue " />
Original file line number Diff line number Diff line change @@ -12,17 +12,15 @@ npm install quill-header-list
1212
1313创建一个元素用于存放标题列表,并将其传入` header-list ` 的` container ` 属性。
1414
15- :::demo src=demos/header-list.vue
16- :::
15+ <demo vue =" ../../demos/header-list.vue " />
1716
1817## 设置滚动容器
1918
2019默认情况下,编辑器会指定自身为滚动容器,可通过传递` scrollContainer ` 属性来指定滚动容器。
2120
2221当页面中存在` fixed ` 元素处于顶部时,你可能会需要进行额外的滚动 offset(比如此文档页面),否则会导致滚动后的标题被` fixed ` 元素遮挡。可以设置` topOffset ` 额外滚动距离。
2322
24- :::demo src=demos/header-list-container.vue
25- :::
23+ <demo vue =" ../../demos/header-list-container.vue " />
2624
2725## 参数选项
2826
Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ Welcome to commit PR for more language support.
88
99可通过函数 ` changeLanguage({ lang, langText }) ` 修改当前语言
1010
11- :::demo src=demos/i18n.vue
12- :::
11+ <demo vue =" ../../demos/i18n.vue " />
1312
1413## 自定义文本
1514
@@ -19,5 +18,4 @@ Welcome to commit PR for more language support.
1918
2019针对直接使用文本作为显示的模块选项,可以使用模板` _i18n"key" ` ,内部会自动根据当前编辑器语言替换 key 对应的文本
2120
22- :::demo src=demos/i18n-custom.vue
23- :::
21+ <demo vue =" ../../demos/i18n-custom.vue " />
Original file line number Diff line number Diff line change 44
55点击图片可显示图片相关工具
66
7- :::demo src=demos/image-toolbar.vue
8- :::
7+ <demo vue =" ../../demos/image-toolbar.vue " />
98
109## 工具栏按钮配置
1110
1211可通过配置项 ` modules.image.toolbar.buttons ` 对工具栏按钮进行配置。默认存在 ` align-left ` 、` align-center ` 、` align-right ` 、` copy ` 、` download ` 五个按钮,可以自行增加按钮或者通过设置 ` false ` 关闭某个按钮。
1312
14- :::demo src=demos/image-toolbar-button.vue
15- :::
13+ <demo vue =" ../../demos/image-toolbar-button.vue " />
1614
1715## 配置
1816
You can’t perform that action at this time.
0 commit comments