Closed thienhuynh1314 closed 2 months ago
You're using a "@ckeditor/ckeditor5-build-classic";
which was put on deprecation path from v42. This build cannot be extended with other features like Font
. If you need to extend the editor with plugins, consider migration.
You have mixed, and very old dependencies with new ones
"@ckeditor/ckeditor5-build-classic": "31.1.0",
"ckeditor5": "^43.1.0",
The import should happen from the main package
// import Font from '@ckeditor/ckeditor5-font/src/font';
// To
import { Font } from 'ckeditor5';
@Witoso Thanks for your support But I get the new error after updating code like your suggestion I update ckeditor/ckeditor5-build-classic to ^43.1.0 and in the local file I update as:
import { ClassicEditor, Font } from 'ckeditor5';
editor = ClassicEditor;
editorData = "";
editorConfig = {
plugins: [ Font, /* other plugins */ ],
toolbar: {
items: [
'undo', 'redo',
'|', 'heading',
'|', 'fontfamily', 'fontsize', 'fontColor', 'fontBackgroundColor',
'|', 'bold', 'italic', 'strikethrough', 'subscript', 'superscript', 'code',
'|', 'alignment',
'link', 'uploadImage', 'blockQuote', 'codeBlock',
'|', 'bulletedList', 'numberedList', 'todoList', 'outdent', 'indent',
'|', 'fullScreen'
],
shouldNotGroupWhenFull: true
},
};
Error:
I'm wanting to add font size, font color, ... to the toolbar of editor.
NOTE: I can run with import ClassicEditor from "@ckeditor/ckeditor5-build-classic"; before
I'm wanting to add font size, font color, ... to the toolbar of editor.
Then read the migration guide I linked above, and don't use @ckeditor/ckeditor5-build-classic
, as this built cannot be extended.
This error suggests the webpack can't build the source files, investigate the webpack version and build configuration. Since version 42.0.0 we ship ES2022 code.
I imported CKEditor in main for global as
In a local file
I can't run project when I uncomment Font:
package.json
I'm using vue2 class component and typescript v5