Skip to content

Commit 67f2425

Browse files
committed
docs: 📝 update modules docs
1 parent d3efb4d commit 67f2425

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

docs/components/demo/DemoEditor.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@
3333
ref="myEditor"
3434
class="h-64 sm:h-96"
3535
v-model:content="myContent"
36-
@ready="handleReady"
37-
@textChange="handleTextChange"
3836
:theme="selectedTheme"
3937
:toolbar="selectedToolbar"
40-
:modules="myModules"
4138
>
4239
</QuillEditor>
4340
</div>
@@ -48,20 +45,12 @@
4845
import { defineComponent, watch, ref } from 'vue'
4946
import VOptions from '../VOptions.vue'
5047
import { deltaContent } from './delta-content'
51-
import BlotFormatter from 'quill-blot-formatter'
5248
5349
export default defineComponent({
5450
components: { VOptions },
5551
setup: () => {
5652
const myEditor = ref()
5753
const myContent = ref(deltaContent)
58-
const myModules = [
59-
'blotFormatter',
60-
BlotFormatter,
61-
{
62-
/* options */
63-
},
64-
]
6554
6655
// ============ OPTIONS =====================
6756
const selectedTheme = ref<string>('snow')
@@ -74,10 +63,10 @@ export default defineComponent({
7463
return {
7564
selectedTheme,
7665
selectedToolbar,
66+
// handleReady,
7767
// ---------------
7868
myEditor,
7969
myContent,
80-
myModules,
8170
}
8271
},
8372
})

docs/content/api/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
Toolbar options to configure the default toolbar icons using an array of format names, see [Toolbar](../guide/toolbar.md) section for more details.
5353

5454
## modules
55-
- **Type:** `[string, any, object] | [string, any, object][]`
56-
- **Type Description:** `[name, module, options]`
55+
- **Type:** `Object | Object[]`
5756

5857
Options to register modules, see [Modules](../guide/modules.md) section for more details.
5958

docs/content/guide/modules.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ export default defineComponent({
2121
QuillEditor,
2222
},
2323
setup: () => {
24-
const modules = ['blotFormatter', BlotFormatter, {/* options */},]
24+
const modules = {
25+
name: 'blotFormatter',
26+
module: BlotFormatter,
27+
options: {/* options */}
28+
}
2529
return { modules }
2630
},
2731
})

0 commit comments

Comments
 (0)