mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
105 lines
3.6 KiB
JavaScript
105 lines
3.6 KiB
JavaScript
|
/**
|
||
|
* @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
|
||
|
*/
|
||
|
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js';
|
||
|
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js';
|
||
|
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js';
|
||
|
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js';
|
||
|
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js';
|
||
|
import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock.js';
|
||
|
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js';
|
||
|
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js';
|
||
|
import GeneralHtmlSupport from '@ckeditor/ckeditor5-html-support/src/generalhtmlsupport.js';
|
||
|
import Heading from '@ckeditor/ckeditor5-heading/src/heading.js';
|
||
|
import Image from '@ckeditor/ckeditor5-image/src/image.js';
|
||
|
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle.js';
|
||
|
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar.js';
|
||
|
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload.js';
|
||
|
import Indent from '@ckeditor/ckeditor5-indent/src/indent.js';
|
||
|
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js';
|
||
|
import Link from '@ckeditor/ckeditor5-link/src/link.js';
|
||
|
import List from '@ckeditor/ckeditor5-list/src/list.js';
|
||
|
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown.js';
|
||
|
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed.js';
|
||
|
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js';
|
||
|
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.js';
|
||
|
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js';
|
||
|
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js';
|
||
|
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js';
|
||
|
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js';
|
||
|
import Table from '@ckeditor/ckeditor5-table/src/table.js';
|
||
|
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar.js';
|
||
|
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation.js';
|
||
|
|
||
|
class Editor extends ClassicEditor {}
|
||
|
|
||
|
// Plugins to include in the build.
|
||
|
Editor.builtinPlugins = [
|
||
|
Autoformat,
|
||
|
BlockQuote,
|
||
|
Bold,
|
||
|
Code,
|
||
|
CodeBlock,
|
||
|
Essentials,
|
||
|
FindAndReplace,
|
||
|
GeneralHtmlSupport,
|
||
|
Heading,
|
||
|
Image,
|
||
|
ImageStyle,
|
||
|
ImageToolbar,
|
||
|
ImageUpload,
|
||
|
Indent,
|
||
|
Italic,
|
||
|
Link,
|
||
|
List,
|
||
|
Markdown,
|
||
|
MediaEmbed,
|
||
|
Paragraph,
|
||
|
PasteFromOffice,
|
||
|
SourceEditing,
|
||
|
SpecialCharacters,
|
||
|
SpecialCharactersEssentials,
|
||
|
SpecialCharactersMathematical,
|
||
|
Table,
|
||
|
TableToolbar,
|
||
|
TextTransformation
|
||
|
];
|
||
|
|
||
|
// Editor configuration.
|
||
|
Editor.defaultConfig = {
|
||
|
toolbar: {
|
||
|
items: [
|
||
|
'bold',
|
||
|
'italic',
|
||
|
'link',
|
||
|
'specialCharacters',
|
||
|
'code',
|
||
|
'|',
|
||
|
'undo',
|
||
|
'redo',
|
||
|
'|',
|
||
|
'findAndReplace',
|
||
|
'sourceEditing',
|
||
|
]
|
||
|
},
|
||
|
language: 'en',
|
||
|
image: {
|
||
|
toolbar: [
|
||
|
'imageTextAlternative',
|
||
|
'imageStyle:inline',
|
||
|
'imageStyle:block',
|
||
|
'imageStyle:side'
|
||
|
]
|
||
|
},
|
||
|
table: {
|
||
|
contentToolbar: [
|
||
|
'tableColumn',
|
||
|
'tableRow',
|
||
|
'mergeTableCells'
|
||
|
]
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default Editor;
|