feat: add @editorjs/code for editorjs codeblocks

This commit is contained in:
Oliver Booth 2024-03-02 05:31:10 +00:00
parent 430ab2b50e
commit dd2438153c
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
3 changed files with 17 additions and 0 deletions

14
package-lock.json generated
View File

@ -9,6 +9,7 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@editorjs/code": "^2.9.0",
"@editorjs/header": "^2.8.1",
"@editorjs/paragraph": "^2.11.3",
"codex-notifier": "^1.1.2",
@ -35,6 +36,19 @@
"resolved": "https://registry.npmjs.org/@codexteam/icons/-/icons-0.0.4.tgz",
"integrity": "sha512-V8N/TY2TGyas4wLrPIFq7bcow68b3gu8DfDt1+rrHPtXxcexadKauRJL6eQgfG7Z0LCrN4boLRawR4S9gjIh/Q=="
},
"node_modules/@editorjs/code": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/@editorjs/code/-/code-2.9.0.tgz",
"integrity": "sha512-QNOWxF29j6mYl/gM5HJzeGOt3s4laoZCUbuRqj6RkIvLBWMU+ASwjckEiouA61hcYUOMfpw4vQjzhsfC7xm/vA==",
"dependencies": {
"@codexteam/icons": "^0.0.5"
}
},
"node_modules/@editorjs/code/node_modules/@codexteam/icons": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/@codexteam/icons/-/icons-0.0.5.tgz",
"integrity": "sha512-s6H2KXhLz2rgbMZSkRm8dsMJvyUNZsEjxobBEg9ztdrb1B2H3pEzY6iTwI4XUPJWJ3c3qRKwV4TrO3J5jUdoQA=="
},
"node_modules/@editorjs/editorjs": {
"version": "2.29.0",
"resolved": "https://registry.npmjs.org/@editorjs/editorjs/-/editorjs-2.29.0.tgz",

View File

@ -34,6 +34,7 @@
"webpack-stream": "^7.0.0"
},
"dependencies": {
"@editorjs/code": "^2.9.0",
"@editorjs/header": "^2.8.1",
"@editorjs/paragraph": "^2.11.3",
"codex-notifier": "^1.1.2",

View File

@ -6,6 +6,7 @@ import Interop from "./Interop";
import SaveButtonMode from "./MarkdownEditor/SaveButtonMode";
import EditorJS from "@editorjs/editorjs";
import Header from "@editorjs/header";
import CodeTool from "@editorjs/code";
import SimpleImage from "./BlockTools/SimpleImage";
import Utility from "../app/Utility";
@ -25,6 +26,7 @@ import Utility from "../app/Utility";
const editor = new EditorJS({
autofocus: true,
tools: {
code: CodeTool,
header: {
class: Header,
config: {