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