Add lists
This commit is contained in:
parent
ee926467ed
commit
665b43c797
|
@ -7,6 +7,7 @@
|
|||
"dependencies": {
|
||||
"@editorjs/editorjs": "^2.29.0",
|
||||
"@editorjs/header": "^2.8.1",
|
||||
"@editorjs/nested-list": "^1.4.2",
|
||||
"@editorjs/paragraph": "^2.11.3",
|
||||
"@inertiajs/vue3": "^1.0.14",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
|
@ -107,6 +108,19 @@
|
|||
"@codexteam/icons": "^0.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@editorjs/nested-list": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@editorjs/nested-list/-/nested-list-1.4.2.tgz",
|
||||
"integrity": "sha512-qb1dAoJ+bihqmlR3822TC2GuIxEjTCLTZsZVWNces3uJIZ+W4019G3IJKBt/MOOgz4Evzad/RvUEKwPCPe6YOQ==",
|
||||
"dependencies": {
|
||||
"@codexteam/icons": "^0.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@editorjs/nested-list/node_modules/@codexteam/icons": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@codexteam/icons/-/icons-0.0.2.tgz",
|
||||
"integrity": "sha512-KdeKj3TwaTHqM3IXd5YjeJP39PBUZTb+dtHjGlf5+b0VgsxYD4qzsZkb11lzopZbAuDsHaZJmAYQ8LFligIT6Q=="
|
||||
},
|
||||
"node_modules/@editorjs/paragraph": {
|
||||
"version": "2.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@editorjs/paragraph/-/paragraph-2.11.3.tgz",
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"dependencies": {
|
||||
"@editorjs/editorjs": "^2.29.0",
|
||||
"@editorjs/header": "^2.8.1",
|
||||
"@editorjs/nested-list": "^1.4.2",
|
||||
"@editorjs/paragraph": "^2.11.3",
|
||||
"@inertiajs/vue3": "^1.0.14",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
|
|
|
@ -16,6 +16,7 @@ import {onMounted, ref} from 'vue';
|
|||
import EditorJS from '@editorjs/editorjs';
|
||||
import Header from '@editorjs/header';
|
||||
import Paragraph from '@editorjs/paragraph';
|
||||
import NestedList from '@editorjs/nested-list';
|
||||
import useFieldSize from '../../composables/useFieldSize.js';
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
|
@ -62,7 +63,7 @@ onMounted(async () => {
|
|||
tools: {
|
||||
paragraph: {
|
||||
class: Paragraph,
|
||||
shortcut: 'SHIFT+P',
|
||||
shortcut: 'CTRL+P',
|
||||
inlineToolbar: true,
|
||||
config: {
|
||||
preserveBlank: true,
|
||||
|
@ -79,6 +80,11 @@ onMounted(async () => {
|
|||
defaultLevel: 2,
|
||||
},
|
||||
},
|
||||
list: {
|
||||
class: NestedList,
|
||||
shortcut: 'CTRL+L',
|
||||
inlineToolbar: true,
|
||||
},
|
||||
},
|
||||
onChange: debounce(async (api, event) => {
|
||||
const data = await editor.value.save();
|
||||
|
|
Loading…
Reference in New Issue