diff --git a/package-lock.json b/package-lock.json index d74eaa5..cbbe118 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@ckeditor/ckeditor5-dev-translations": "^32.1.2", "@ckeditor/ckeditor5-dev-utils": "^32.1.2", "@ckeditor/ckeditor5-editor-balloon": "^37.1.0", + "@ckeditor/ckeditor5-editor-classic": "^37.1.0", "@ckeditor/ckeditor5-essentials": "^37.1.0", "@ckeditor/ckeditor5-heading": "^37.1.0", "@ckeditor/ckeditor5-highlight": "^37.1.0", @@ -422,6 +423,20 @@ "npm": ">=5.7.1" } }, + "node_modules/@ckeditor/ckeditor5-editor-classic": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-37.1.0.tgz", + "integrity": "sha512-3XipfINHckd8NITQT9ePdk0+3vytZ567x5qDGCeTgVAKqiFYNaEmuQKir1+D8uQddbrDNolv91XcILN8XHzDWQ==", + "dev": true, + "dependencies": { + "ckeditor5": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, "node_modules/@ckeditor/ckeditor5-engine": { "version": "37.1.0", "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-37.1.0.tgz", @@ -5112,6 +5127,16 @@ "lodash-es": "^4.17.15" } }, + "@ckeditor/ckeditor5-editor-classic": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-37.1.0.tgz", + "integrity": "sha512-3XipfINHckd8NITQT9ePdk0+3vytZ567x5qDGCeTgVAKqiFYNaEmuQKir1+D8uQddbrDNolv91XcILN8XHzDWQ==", + "dev": true, + "requires": { + "ckeditor5": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, "@ckeditor/ckeditor5-engine": { "version": "37.1.0", "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-37.1.0.tgz", diff --git a/package.json b/package.json index b4a52e9..2fbd47f 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "@ckeditor/ckeditor5-dev-translations": "^32.1.2", "@ckeditor/ckeditor5-dev-utils": "^32.1.2", "@ckeditor/ckeditor5-editor-balloon": "^37.1.0", + "@ckeditor/ckeditor5-editor-classic": "^37.1.0", "@ckeditor/ckeditor5-essentials": "^37.1.0", "@ckeditor/ckeditor5-heading": "^37.1.0", "@ckeditor/ckeditor5-highlight": "^37.1.0", diff --git a/src/ckeditor.js b/src/ckeditor.js index fb7e1e6..44e6c50 100644 --- a/src/ckeditor.js +++ b/src/ckeditor.js @@ -1,4 +1,5 @@ -import BalloonEditor from "@ckeditor/ckeditor5-editor-balloon/src/ballooneditor.js"; +import { BalloonEditor as BalloonEditorBase } from "@ckeditor/ckeditor5-editor-balloon"; +import { ClassicEditor as ClassicEditorBase } from "@ckeditor/ckeditor5-editor-classic"; import Autoformat from "@ckeditor/ckeditor5-autoformat/src/autoformat"; import BlockQuote from "@ckeditor/ckeditor5-block-quote/src/blockquote.js"; import Bold from "@ckeditor/ckeditor5-basic-styles/src/bold.js"; @@ -30,9 +31,10 @@ import "./variables.css"; import "./content-styles.css"; import "./custom-content-styles.css"; -class Editor extends BalloonEditor {} +class BalloonEditor extends BalloonEditorBase {} +class ClassicEditor extends ClassicEditorBase {} -Editor.builtinPlugins = [ +const plugins = [ Autoformat, BlockQuote, Bold, @@ -57,7 +59,7 @@ Editor.builtinPlugins = [ WordCount, ]; -Editor.defaultConfig = { +const config = { toolbar: { items: [ "undo", @@ -97,9 +99,15 @@ Editor.defaultConfig = { }, }; +BalloonEditor.builtinPlugins = plugins; +ClassicEditor.builtinPlugins = plugins; + +BalloonEditor.defaultConfig = config; +ClassicEditor.defaultConfig = config; + addMissingTranslationsDe(); addMissingTranslationsEn(); addMissingTranslationsEs(); addMissingTranslationsUk(); -export default Editor; +export default { BalloonEditor, ClassicEditor };