2022-07-25 01:09:31 +02:00
|
|
|
/**
|
|
|
|
* @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
|
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
|
|
*/
|
2025-08-03 19:46:57 +02:00
|
|
|
import {ClassicEditor} from 'ckeditor5';
|
|
|
|
import {Alignment} from 'ckeditor5';
|
|
|
|
import {Autoformat} from 'ckeditor5';
|
|
|
|
import {Base64UploadAdapter} from 'ckeditor5';
|
|
|
|
import {BlockQuote} from 'ckeditor5';
|
|
|
|
import {Bold} from 'ckeditor5';
|
|
|
|
import {Code} from 'ckeditor5';
|
|
|
|
import {CodeBlock} from 'ckeditor5';
|
|
|
|
import {Essentials} from 'ckeditor5';
|
|
|
|
import {FindAndReplace} from 'ckeditor5';
|
|
|
|
import {FontBackgroundColor} from 'ckeditor5';
|
|
|
|
import {FontColor} from 'ckeditor5';
|
|
|
|
import {FontFamily} from 'ckeditor5';
|
|
|
|
import {FontSize} from 'ckeditor5';
|
|
|
|
import {GeneralHtmlSupport} from 'ckeditor5';
|
|
|
|
import {Heading} from 'ckeditor5';
|
|
|
|
import {Highlight} from 'ckeditor5';
|
|
|
|
import {HorizontalLine} from 'ckeditor5';
|
|
|
|
import {HtmlComment} from 'ckeditor5';
|
|
|
|
import {HtmlEmbed} from 'ckeditor5';
|
|
|
|
import {Image} from 'ckeditor5';
|
|
|
|
import {ImageResize} from 'ckeditor5';
|
|
|
|
import {ImageStyle} from 'ckeditor5';
|
|
|
|
import {ImageToolbar} from 'ckeditor5';
|
|
|
|
import {ImageUpload} from 'ckeditor5';
|
|
|
|
import {Indent} from 'ckeditor5';
|
|
|
|
import {IndentBlock} from 'ckeditor5';
|
|
|
|
import {Italic} from 'ckeditor5';
|
|
|
|
import {Link} from 'ckeditor5';
|
|
|
|
import {LinkImage} from 'ckeditor5';
|
|
|
|
import {List} from 'ckeditor5';
|
|
|
|
import {ListProperties} from 'ckeditor5';
|
|
|
|
import {Markdown} from 'ckeditor5';
|
|
|
|
import {MediaEmbed} from 'ckeditor5';
|
|
|
|
import {MediaEmbedToolbar} from 'ckeditor5';
|
|
|
|
import {Paragraph} from 'ckeditor5';
|
|
|
|
import {PasteFromOffice} from 'ckeditor5';
|
|
|
|
import {RemoveFormat} from 'ckeditor5';
|
|
|
|
import {SourceEditing} from 'ckeditor5';
|
|
|
|
import {SpecialCharacters} from 'ckeditor5';
|
|
|
|
import {SpecialCharactersArrows} from 'ckeditor5';
|
|
|
|
import {SpecialCharactersCurrency} from 'ckeditor5';
|
|
|
|
import {SpecialCharactersEssentials} from 'ckeditor5';
|
|
|
|
import {SpecialCharactersLatin} from 'ckeditor5';
|
|
|
|
import {SpecialCharactersMathematical} from 'ckeditor5';
|
|
|
|
import {SpecialCharactersText} from 'ckeditor5';
|
|
|
|
import {Strikethrough} from 'ckeditor5';
|
|
|
|
import {Subscript} from 'ckeditor5';
|
|
|
|
import {Superscript} from 'ckeditor5';
|
|
|
|
import {Table} from 'ckeditor5';
|
|
|
|
import {TableCaption} from 'ckeditor5';
|
|
|
|
import {TableCellProperties} from 'ckeditor5';
|
|
|
|
import {TableColumnResize} from 'ckeditor5';
|
|
|
|
import {TableProperties} from 'ckeditor5';
|
|
|
|
import {TableToolbar} from 'ckeditor5';
|
|
|
|
import {Underline} from 'ckeditor5';
|
|
|
|
import {WordCount} from 'ckeditor5';
|
|
|
|
import {EditorWatchdog} from 'ckeditor5';
|
|
|
|
import {TodoList} from 'ckeditor5';
|
2022-07-26 01:20:58 +02:00
|
|
|
|
2022-07-26 11:52:00 +02:00
|
|
|
import ExtendedMarkdown from "./plugins/extendedMarkdown.js";
|
2025-08-03 20:22:00 +02:00
|
|
|
import SpecialCharactersGreek from "./plugins/special_characters_emoji";
|
|
|
|
import {Mention, Emoji} from "ckeditor5";
|
2022-07-25 01:09:31 +02:00
|
|
|
|
|
|
|
class Editor extends ClassicEditor {}
|
|
|
|
|
|
|
|
// Plugins to include in the build.
|
|
|
|
Editor.builtinPlugins = [
|
|
|
|
Autoformat,
|
2022-07-26 01:20:58 +02:00
|
|
|
Base64UploadAdapter,
|
2022-07-25 01:09:31 +02:00
|
|
|
BlockQuote,
|
|
|
|
Bold,
|
|
|
|
Code,
|
|
|
|
CodeBlock,
|
|
|
|
Essentials,
|
|
|
|
FindAndReplace,
|
2022-07-26 01:20:58 +02:00
|
|
|
FontBackgroundColor,
|
|
|
|
FontColor,
|
|
|
|
FontSize,
|
2022-07-25 01:09:31 +02:00
|
|
|
GeneralHtmlSupport,
|
|
|
|
Heading,
|
2022-07-26 01:20:58 +02:00
|
|
|
Highlight,
|
|
|
|
HorizontalLine,
|
2022-07-25 01:09:31 +02:00
|
|
|
Image,
|
2022-07-26 01:20:58 +02:00
|
|
|
ImageResize,
|
2022-07-25 01:09:31 +02:00
|
|
|
ImageStyle,
|
|
|
|
ImageToolbar,
|
|
|
|
ImageUpload,
|
|
|
|
Indent,
|
2022-07-26 01:20:58 +02:00
|
|
|
IndentBlock,
|
2022-07-25 01:09:31 +02:00
|
|
|
Italic,
|
|
|
|
Link,
|
2022-07-26 01:20:58 +02:00
|
|
|
LinkImage,
|
2022-07-25 01:09:31 +02:00
|
|
|
List,
|
2022-07-26 01:20:58 +02:00
|
|
|
//MediaEmbed,
|
|
|
|
//MediaEmbedToolbar,
|
2022-07-25 01:09:31 +02:00
|
|
|
Paragraph,
|
|
|
|
PasteFromOffice,
|
2022-07-26 01:20:58 +02:00
|
|
|
RemoveFormat,
|
2022-07-25 01:09:31 +02:00
|
|
|
SourceEditing,
|
|
|
|
SpecialCharacters,
|
2022-07-26 01:20:58 +02:00
|
|
|
SpecialCharactersArrows,
|
|
|
|
SpecialCharactersCurrency,
|
2022-07-25 01:09:31 +02:00
|
|
|
SpecialCharactersEssentials,
|
2022-07-26 01:20:58 +02:00
|
|
|
SpecialCharactersLatin,
|
2022-07-25 01:09:31 +02:00
|
|
|
SpecialCharactersMathematical,
|
2022-07-26 01:20:58 +02:00
|
|
|
SpecialCharactersText,
|
|
|
|
Strikethrough,
|
|
|
|
Subscript,
|
|
|
|
Superscript,
|
2022-07-25 01:09:31 +02:00
|
|
|
Table,
|
2022-07-26 01:20:58 +02:00
|
|
|
TableProperties,
|
2022-07-25 01:09:31 +02:00
|
|
|
TableToolbar,
|
2022-07-26 01:20:58 +02:00
|
|
|
Underline,
|
2022-07-26 21:23:31 +02:00
|
|
|
TodoList,
|
2022-07-26 21:41:30 +02:00
|
|
|
|
2025-08-03 20:22:00 +02:00
|
|
|
Mention, Emoji,
|
|
|
|
|
2022-07-26 21:41:30 +02:00
|
|
|
//Our own extensions
|
|
|
|
ExtendedMarkdown,
|
2025-08-03 20:22:00 +02:00
|
|
|
SpecialCharactersGreek
|
2022-07-25 01:09:31 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
// Editor configuration.
|
|
|
|
Editor.defaultConfig = {
|
|
|
|
toolbar: {
|
|
|
|
items: [
|
|
|
|
'heading',
|
|
|
|
'|',
|
|
|
|
'bold',
|
|
|
|
'italic',
|
2022-07-26 01:20:58 +02:00
|
|
|
'underline',
|
|
|
|
'strikethrough',
|
|
|
|
'subscript',
|
|
|
|
'superscript',
|
|
|
|
'removeFormat',
|
|
|
|
'highlight',
|
|
|
|
'|',
|
|
|
|
'fontBackgroundColor',
|
|
|
|
'fontColor',
|
|
|
|
'fontSize',
|
|
|
|
'|',
|
2022-07-25 01:09:31 +02:00
|
|
|
'link',
|
|
|
|
'bulletedList',
|
|
|
|
'numberedList',
|
|
|
|
'outdent',
|
|
|
|
'indent',
|
|
|
|
'|',
|
2022-07-26 01:20:58 +02:00
|
|
|
'specialCharacters',
|
2025-08-03 20:22:00 +02:00
|
|
|
"emoji",
|
2022-07-26 01:20:58 +02:00
|
|
|
'horizontalLine',
|
|
|
|
'|',
|
2022-07-25 01:09:31 +02:00
|
|
|
'imageUpload',
|
|
|
|
'blockQuote',
|
|
|
|
'insertTable',
|
2022-07-26 01:20:58 +02:00
|
|
|
//'mediaEmbed',
|
2022-07-25 01:09:31 +02:00
|
|
|
'code',
|
|
|
|
'codeBlock',
|
2022-07-26 21:23:31 +02:00
|
|
|
'todoList',
|
2022-07-26 01:20:58 +02:00
|
|
|
'|',
|
|
|
|
'undo',
|
|
|
|
'redo',
|
|
|
|
'findAndReplace',
|
2022-07-25 01:09:31 +02:00
|
|
|
'sourceEditing',
|
2022-07-29 21:07:54 +02:00
|
|
|
],
|
|
|
|
shouldNotGroupWhenFull: true
|
2022-07-25 01:09:31 +02:00
|
|
|
},
|
|
|
|
language: 'en',
|
|
|
|
image: {
|
|
|
|
toolbar: [
|
|
|
|
'imageTextAlternative',
|
|
|
|
'imageStyle:inline',
|
|
|
|
'imageStyle:block',
|
2022-07-26 01:20:58 +02:00
|
|
|
'imageStyle:side',
|
|
|
|
'linkImage'
|
2022-07-25 01:09:31 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
table: {
|
|
|
|
contentToolbar: [
|
|
|
|
'tableColumn',
|
|
|
|
'tableRow',
|
2022-07-26 01:20:58 +02:00
|
|
|
'mergeTableCells',
|
|
|
|
'tableProperties'
|
2022-07-25 01:09:31 +02:00
|
|
|
]
|
2022-07-26 21:23:31 +02:00
|
|
|
},
|
|
|
|
list: {
|
|
|
|
properties: {
|
|
|
|
styles: false,
|
|
|
|
|
|
|
|
}
|
2022-07-25 01:09:31 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-07-26 01:20:58 +02:00
|
|
|
export default { Editor, EditorWatchdog };
|