2024-11-09 14:09:50 +02:00
/ * *
* @license Copyright ( c ) 2003 - 2024 , CKSource Holding sp . z o . o . All rights reserved .
* For licensing , see LICENSE . md or https : //ckeditor.com/legal/ckeditor-oss-license
* /
// The editor creator to use.
import { DecoupledEditor as DecoupledEditorBase } from '@ckeditor/ckeditor5-editor-decoupled' ;
import '../theme/theme.css' ;
2024-11-09 15:39:40 +02:00
import { COMMON_PLUGINS , COMMON_SETTINGS } from './config' ;
2024-11-09 14:09:50 +02:00
export default class DecoupledEditor extends DecoupledEditorBase {
public static override builtinPlugins = [
2024-11-09 15:33:16 +02:00
. . . COMMON_PLUGINS ,
2024-11-09 14:09:50 +02:00
] ;
public static override defaultConfig = {
2024-11-09 15:39:40 +02:00
. . . COMMON_SETTINGS ,
2024-11-09 14:09:50 +02:00
// For nested toolbars, refer to https://ckeditor.com/docs/ckeditor5/latest/getting-started/setup/toolbar.html#grouping-toolbar-items-in-dropdowns-nested-toolbars.
toolbar : {
items : [
'heading' ,
'fontSize' ,
'|' ,
'bold' ,
'italic' ,
{
label : "Text formatting" ,
icon : "text" ,
items : [
'underline' ,
'strikethrough' ,
'superscript' ,
'subscript' ,
'code' ,
] ,
} ,
'|' ,
'fontColor' ,
'fontBackgroundColor' ,
'removeFormat' ,
'|' ,
'bulletedList' , 'numberedList' , 'todoList' ,
'|' ,
'blockQuote' ,
'insertTable' ,
'codeBlock' ,
{
label : "Insert" ,
icon : "plus" ,
items : [
'imageUpload' ,
'|' ,
'link' ,
'internallink' ,
'includeNote' ,
'|' ,
'specialCharacters' ,
'math' ,
'horizontalLine'
]
} ,
'|' ,
'outdent' , 'indent' ,
'|' ,
'markdownImport' ,
'cuttonote'
]
2024-11-09 15:39:40 +02:00
}
2024-11-09 14:09:50 +02:00
} ;
}