mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-06 09:21:39 +00:00
Compare commits
5 commits
e2735823a0
...
fc3857aa67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc3857aa67 | ||
|
|
db1b91fc32 | ||
|
|
e87720a838 | ||
|
|
74fef78120 | ||
|
|
9eb8e33e09 |
16 changed files with 2697 additions and 1597 deletions
1
assets/ckeditor/emojis.json
Normal file
1
assets/ckeditor/emojis.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,66 +1,63 @@
|
||||||
/**
|
import {ClassicEditor} from 'ckeditor5'
|
||||||
* @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved.
|
import {Alignment} from 'ckeditor5';
|
||||||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
import {Autoformat} from 'ckeditor5';
|
||||||
*/
|
import {Base64UploadAdapter} from 'ckeditor5';
|
||||||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js';
|
import {BlockQuote} from 'ckeditor5';
|
||||||
import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment.js';
|
import {Bold} from 'ckeditor5';
|
||||||
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js';
|
import {Code} from 'ckeditor5';
|
||||||
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter.js';
|
import {CodeBlock} from 'ckeditor5';
|
||||||
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js';
|
import {Essentials} from 'ckeditor5';
|
||||||
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js';
|
import {FindAndReplace} from 'ckeditor5';
|
||||||
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js';
|
import {FontBackgroundColor} from 'ckeditor5';
|
||||||
import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock.js';
|
import {FontColor} from 'ckeditor5';
|
||||||
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js';
|
import {FontFamily} from 'ckeditor5';
|
||||||
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js';
|
import {FontSize} from 'ckeditor5';
|
||||||
import FontBackgroundColor from '@ckeditor/ckeditor5-font/src/fontbackgroundcolor.js';
|
import {GeneralHtmlSupport} from 'ckeditor5';
|
||||||
import FontColor from '@ckeditor/ckeditor5-font/src/fontcolor.js';
|
import {Heading} from 'ckeditor5';
|
||||||
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily.js';
|
import {Highlight} from 'ckeditor5';
|
||||||
import FontSize from '@ckeditor/ckeditor5-font/src/fontsize.js';
|
import {HorizontalLine} from 'ckeditor5';
|
||||||
import GeneralHtmlSupport from '@ckeditor/ckeditor5-html-support/src/generalhtmlsupport.js';
|
import {HtmlComment} from 'ckeditor5';
|
||||||
import Heading from '@ckeditor/ckeditor5-heading/src/heading.js';
|
import {HtmlEmbed} from 'ckeditor5';
|
||||||
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js';
|
import {Image} from 'ckeditor5';
|
||||||
import HorizontalLine from '@ckeditor/ckeditor5-horizontal-line/src/horizontalline.js';
|
import {ImageResize} from 'ckeditor5';
|
||||||
import HtmlComment from '@ckeditor/ckeditor5-html-support/src/htmlcomment.js';
|
import {ImageStyle} from 'ckeditor5';
|
||||||
import HtmlEmbed from '@ckeditor/ckeditor5-html-embed/src/htmlembed.js';
|
import {ImageToolbar} from 'ckeditor5';
|
||||||
import Image from '@ckeditor/ckeditor5-image/src/image.js';
|
import {ImageUpload} from 'ckeditor5';
|
||||||
import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize.js';
|
import {Indent} from 'ckeditor5';
|
||||||
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle.js';
|
import {IndentBlock} from 'ckeditor5';
|
||||||
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar.js';
|
import {Italic} from 'ckeditor5';
|
||||||
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload.js';
|
import {Link} from 'ckeditor5';
|
||||||
import Indent from '@ckeditor/ckeditor5-indent/src/indent.js';
|
import {LinkImage} from 'ckeditor5';
|
||||||
import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock.js';
|
import {List} from 'ckeditor5';
|
||||||
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js';
|
import {ListProperties} from 'ckeditor5';
|
||||||
import Link from '@ckeditor/ckeditor5-link/src/link.js';
|
import {Markdown} from 'ckeditor5';
|
||||||
import LinkImage from '@ckeditor/ckeditor5-link/src/linkimage.js';
|
import {MediaEmbed} from 'ckeditor5';
|
||||||
import List from '@ckeditor/ckeditor5-list/src/list.js';
|
import {MediaEmbedToolbar} from 'ckeditor5';
|
||||||
import ListProperties from '@ckeditor/ckeditor5-list/src/listproperties.js';
|
import {Paragraph} from 'ckeditor5';
|
||||||
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown.js';
|
import {PasteFromOffice} from 'ckeditor5';
|
||||||
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed.js';
|
import {RemoveFormat} from 'ckeditor5';
|
||||||
import MediaEmbedToolbar from '@ckeditor/ckeditor5-media-embed/src/mediaembedtoolbar.js';
|
import {SourceEditing} from 'ckeditor5';
|
||||||
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js';
|
import {SpecialCharacters} from 'ckeditor5';
|
||||||
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.js';
|
import {SpecialCharactersArrows} from 'ckeditor5';
|
||||||
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js';
|
import {SpecialCharactersCurrency} from 'ckeditor5';
|
||||||
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js';
|
import {SpecialCharactersEssentials} from 'ckeditor5';
|
||||||
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js';
|
import {SpecialCharactersLatin} from 'ckeditor5';
|
||||||
import SpecialCharactersArrows from '@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.js';
|
import {SpecialCharactersMathematical} from 'ckeditor5';
|
||||||
import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js';
|
import {SpecialCharactersText} from 'ckeditor5';
|
||||||
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js';
|
import {Strikethrough} from 'ckeditor5';
|
||||||
import SpecialCharactersLatin from '@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.js';
|
import {Subscript} from 'ckeditor5';
|
||||||
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js';
|
import {Superscript} from 'ckeditor5';
|
||||||
import SpecialCharactersText from '@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.js';
|
import {Table} from 'ckeditor5';
|
||||||
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough.js';
|
import {TableCaption} from 'ckeditor5';
|
||||||
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript.js';
|
import {TableCellProperties} from 'ckeditor5';
|
||||||
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript.js';
|
import {TableColumnResize} from 'ckeditor5';
|
||||||
import Table from '@ckeditor/ckeditor5-table/src/table.js';
|
import {TableProperties} from 'ckeditor5';
|
||||||
import TableCaption from '@ckeditor/ckeditor5-table/src/tablecaption.js';
|
import {TableToolbar} from 'ckeditor5';
|
||||||
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';
|
import {Underline} from 'ckeditor5';
|
||||||
import TableColumnResize from '@ckeditor/ckeditor5-table/src/tablecolumnresize.js';
|
import {WordCount} from 'ckeditor5';
|
||||||
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
|
import {EditorWatchdog} from 'ckeditor5';
|
||||||
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar.js';
|
|
||||||
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline.js';
|
|
||||||
import WordCount from '@ckeditor/ckeditor5-word-count/src/wordcount.js';
|
|
||||||
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog.js';
|
|
||||||
import PartDBLabel from "./plugins/PartDBLabel/PartDBLabel";
|
import PartDBLabel from "./plugins/PartDBLabel/PartDBLabel";
|
||||||
|
import SpecialCharactersGreek from "./plugins/special_characters_emoji";
|
||||||
|
|
||||||
class Editor extends ClassicEditor {}
|
class Editor extends ClassicEditor {}
|
||||||
|
|
||||||
|
|
@ -122,7 +119,8 @@ Editor.builtinPlugins = [
|
||||||
Underline,
|
Underline,
|
||||||
WordCount,
|
WordCount,
|
||||||
|
|
||||||
PartDBLabel
|
PartDBLabel,
|
||||||
|
SpecialCharactersGreek
|
||||||
];
|
];
|
||||||
|
|
||||||
// Editor configuration.
|
// Editor configuration.
|
||||||
|
|
|
||||||
|
|
@ -2,68 +2,69 @@
|
||||||
* @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved.
|
* @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
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||||
*/
|
*/
|
||||||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js';
|
import {ClassicEditor} from 'ckeditor5';
|
||||||
import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment.js';
|
import {Alignment} from 'ckeditor5';
|
||||||
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js';
|
import {Autoformat} from 'ckeditor5';
|
||||||
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter.js';
|
import {Base64UploadAdapter} from 'ckeditor5';
|
||||||
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js';
|
import {BlockQuote} from 'ckeditor5';
|
||||||
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js';
|
import {Bold} from 'ckeditor5';
|
||||||
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js';
|
import {Code} from 'ckeditor5';
|
||||||
import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock.js';
|
import {CodeBlock} from 'ckeditor5';
|
||||||
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js';
|
import {Essentials} from 'ckeditor5';
|
||||||
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js';
|
import {FindAndReplace} from 'ckeditor5';
|
||||||
import FontBackgroundColor from '@ckeditor/ckeditor5-font/src/fontbackgroundcolor.js';
|
import {FontBackgroundColor} from 'ckeditor5';
|
||||||
import FontColor from '@ckeditor/ckeditor5-font/src/fontcolor.js';
|
import {FontColor} from 'ckeditor5';
|
||||||
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily.js';
|
import {FontFamily} from 'ckeditor5';
|
||||||
import FontSize from '@ckeditor/ckeditor5-font/src/fontsize.js';
|
import {FontSize} from 'ckeditor5';
|
||||||
import GeneralHtmlSupport from '@ckeditor/ckeditor5-html-support/src/generalhtmlsupport.js';
|
import {GeneralHtmlSupport} from 'ckeditor5';
|
||||||
import Heading from '@ckeditor/ckeditor5-heading/src/heading.js';
|
import {Heading} from 'ckeditor5';
|
||||||
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js';
|
import {Highlight} from 'ckeditor5';
|
||||||
import HorizontalLine from '@ckeditor/ckeditor5-horizontal-line/src/horizontalline.js';
|
import {HorizontalLine} from 'ckeditor5';
|
||||||
import HtmlComment from '@ckeditor/ckeditor5-html-support/src/htmlcomment.js';
|
import {HtmlComment} from 'ckeditor5';
|
||||||
import HtmlEmbed from '@ckeditor/ckeditor5-html-embed/src/htmlembed.js';
|
import {HtmlEmbed} from 'ckeditor5';
|
||||||
import Image from '@ckeditor/ckeditor5-image/src/image.js';
|
import {Image} from 'ckeditor5';
|
||||||
import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize.js';
|
import {ImageResize} from 'ckeditor5';
|
||||||
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle.js';
|
import {ImageStyle} from 'ckeditor5';
|
||||||
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar.js';
|
import {ImageToolbar} from 'ckeditor5';
|
||||||
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload.js';
|
import {ImageUpload} from 'ckeditor5';
|
||||||
import Indent from '@ckeditor/ckeditor5-indent/src/indent.js';
|
import {Indent} from 'ckeditor5';
|
||||||
import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock.js';
|
import {IndentBlock} from 'ckeditor5';
|
||||||
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js';
|
import {Italic} from 'ckeditor5';
|
||||||
import Link from '@ckeditor/ckeditor5-link/src/link.js';
|
import {Link} from 'ckeditor5';
|
||||||
import LinkImage from '@ckeditor/ckeditor5-link/src/linkimage.js';
|
import {LinkImage} from 'ckeditor5';
|
||||||
import List from '@ckeditor/ckeditor5-list/src/list.js';
|
import {List} from 'ckeditor5';
|
||||||
import ListProperties from '@ckeditor/ckeditor5-list/src/listproperties.js';
|
import {ListProperties} from 'ckeditor5';
|
||||||
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown.js';
|
import {Markdown} from 'ckeditor5';
|
||||||
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed.js';
|
import {MediaEmbed} from 'ckeditor5';
|
||||||
import MediaEmbedToolbar from '@ckeditor/ckeditor5-media-embed/src/mediaembedtoolbar.js';
|
import {MediaEmbedToolbar} from 'ckeditor5';
|
||||||
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js';
|
import {Paragraph} from 'ckeditor5';
|
||||||
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.js';
|
import {PasteFromOffice} from 'ckeditor5';
|
||||||
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js';
|
import {RemoveFormat} from 'ckeditor5';
|
||||||
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js';
|
import {SourceEditing} from 'ckeditor5';
|
||||||
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js';
|
import {SpecialCharacters} from 'ckeditor5';
|
||||||
import SpecialCharactersArrows from '@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.js';
|
import {SpecialCharactersArrows} from 'ckeditor5';
|
||||||
import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js';
|
import {SpecialCharactersCurrency} from 'ckeditor5';
|
||||||
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js';
|
import {SpecialCharactersEssentials} from 'ckeditor5';
|
||||||
import SpecialCharactersLatin from '@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.js';
|
import {SpecialCharactersLatin} from 'ckeditor5';
|
||||||
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js';
|
import {SpecialCharactersMathematical} from 'ckeditor5';
|
||||||
import SpecialCharactersText from '@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.js';
|
import {SpecialCharactersText} from 'ckeditor5';
|
||||||
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough.js';
|
import {Strikethrough} from 'ckeditor5';
|
||||||
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript.js';
|
import {Subscript} from 'ckeditor5';
|
||||||
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript.js';
|
import {Superscript} from 'ckeditor5';
|
||||||
import Table from '@ckeditor/ckeditor5-table/src/table.js';
|
import {Table} from 'ckeditor5';
|
||||||
import TableCaption from '@ckeditor/ckeditor5-table/src/tablecaption.js';
|
import {TableCaption} from 'ckeditor5';
|
||||||
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';
|
import {TableCellProperties} from 'ckeditor5';
|
||||||
import TableColumnResize from '@ckeditor/ckeditor5-table/src/tablecolumnresize.js';
|
import {TableColumnResize} from 'ckeditor5';
|
||||||
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
|
import {TableProperties} from 'ckeditor5';
|
||||||
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar.js';
|
import {TableToolbar} from 'ckeditor5';
|
||||||
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline.js';
|
import {Underline} from 'ckeditor5';
|
||||||
import WordCount from '@ckeditor/ckeditor5-word-count/src/wordcount.js';
|
import {WordCount} from 'ckeditor5';
|
||||||
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog.js';
|
import {EditorWatchdog} from 'ckeditor5';
|
||||||
import TodoList from '@ckeditor/ckeditor5-list/src/todolist';
|
import {TodoList} from 'ckeditor5';
|
||||||
|
|
||||||
import ExtendedMarkdown from "./plugins/extendedMarkdown.js";
|
import ExtendedMarkdown from "./plugins/extendedMarkdown.js";
|
||||||
import SpecialCharactersEmoji from "./plugins/special_characters_emoji";
|
import SpecialCharactersGreek from "./plugins/special_characters_emoji";
|
||||||
|
import {Mention, Emoji} from "ckeditor5";
|
||||||
|
|
||||||
class Editor extends ClassicEditor {}
|
class Editor extends ClassicEditor {}
|
||||||
|
|
||||||
|
|
@ -117,9 +118,11 @@ Editor.builtinPlugins = [
|
||||||
Underline,
|
Underline,
|
||||||
TodoList,
|
TodoList,
|
||||||
|
|
||||||
|
Mention, Emoji,
|
||||||
|
|
||||||
//Our own extensions
|
//Our own extensions
|
||||||
ExtendedMarkdown,
|
ExtendedMarkdown,
|
||||||
SpecialCharactersEmoji
|
SpecialCharactersGreek
|
||||||
];
|
];
|
||||||
|
|
||||||
// Editor configuration.
|
// Editor configuration.
|
||||||
|
|
@ -148,6 +151,7 @@ Editor.defaultConfig = {
|
||||||
'indent',
|
'indent',
|
||||||
'|',
|
'|',
|
||||||
'specialCharacters',
|
'specialCharacters',
|
||||||
|
"emoji",
|
||||||
'horizontalLine',
|
'horizontalLine',
|
||||||
'|',
|
'|',
|
||||||
'imageUpload',
|
'imageUpload',
|
||||||
|
|
|
||||||
|
|
@ -2,35 +2,36 @@
|
||||||
* @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved.
|
* @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
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
||||||
*/
|
*/
|
||||||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js';
|
import {ClassicEditor} from 'ckeditor5';
|
||||||
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js';
|
import {Autoformat} from 'ckeditor5';
|
||||||
import AutoLink from '@ckeditor/ckeditor5-link/src/autolink.js';
|
import {AutoLink} from 'ckeditor5';
|
||||||
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js';
|
import {Bold} from 'ckeditor5';
|
||||||
import Code from '@ckeditor/ckeditor5-basic-styles/src/code.js';
|
import {Code} from 'ckeditor5';
|
||||||
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js';
|
import {Essentials} from 'ckeditor5';
|
||||||
import FindAndReplace from '@ckeditor/ckeditor5-find-and-replace/src/findandreplace.js';
|
import {FindAndReplace} from 'ckeditor5';
|
||||||
import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight.js';
|
import {Highlight} from 'ckeditor5';
|
||||||
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js';
|
import {Italic} from 'ckeditor5';
|
||||||
import Link from '@ckeditor/ckeditor5-link/src/link.js';
|
import {Link} from 'ckeditor5';
|
||||||
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js';
|
import {Paragraph} from 'ckeditor5';
|
||||||
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js';
|
import {RemoveFormat} from 'ckeditor5';
|
||||||
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting.js';
|
import {SourceEditing} from 'ckeditor5';
|
||||||
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js';
|
import {SpecialCharacters} from 'ckeditor5';
|
||||||
import SpecialCharactersArrows from '@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.js';
|
import {SpecialCharactersArrows} from 'ckeditor5';
|
||||||
import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js';
|
import {SpecialCharactersCurrency} from 'ckeditor5';
|
||||||
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.js';
|
import {SpecialCharactersEssentials} from 'ckeditor5';
|
||||||
import SpecialCharactersLatin from '@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.js';
|
import {SpecialCharactersLatin} from 'ckeditor5';
|
||||||
import SpecialCharactersMathematical from '@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.js';
|
import {SpecialCharactersMathematical} from 'ckeditor5';
|
||||||
import SpecialCharactersText from '@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.js';
|
import {SpecialCharactersText} from 'ckeditor5';
|
||||||
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough.js';
|
import {Strikethrough} from 'ckeditor5';
|
||||||
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript.js';
|
import {Subscript} from 'ckeditor5';
|
||||||
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript.js';
|
import {Superscript} from 'ckeditor5';
|
||||||
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline.js';
|
import {Underline} from 'ckeditor5';
|
||||||
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog.js';
|
import {EditorWatchdog} from 'ckeditor5';
|
||||||
|
import {Mention, Emoji} from "ckeditor5";
|
||||||
|
|
||||||
import ExtendedMarkdownInline from "./plugins/extendedMarkdownInline";
|
import ExtendedMarkdownInline from "./plugins/extendedMarkdownInline";
|
||||||
import SingleLinePlugin from "./plugins/singleLine";
|
import SingleLinePlugin from "./plugins/singleLine";
|
||||||
import SpecialCharactersEmoji from "./plugins/special_characters_emoji";
|
import SpecialCharactersGreek from "./plugins/special_characters_emoji";
|
||||||
|
|
||||||
class Editor extends ClassicEditor {}
|
class Editor extends ClassicEditor {}
|
||||||
|
|
||||||
|
|
@ -62,7 +63,8 @@ Editor.builtinPlugins = [
|
||||||
|
|
||||||
ExtendedMarkdownInline,
|
ExtendedMarkdownInline,
|
||||||
SingleLinePlugin,
|
SingleLinePlugin,
|
||||||
SpecialCharactersEmoji
|
SpecialCharactersGreek,
|
||||||
|
Mention, Emoji
|
||||||
];
|
];
|
||||||
|
|
||||||
// Editor configuration.
|
// Editor configuration.
|
||||||
|
|
@ -81,6 +83,7 @@ Editor.defaultConfig = {
|
||||||
'link',
|
'link',
|
||||||
'code',
|
'code',
|
||||||
'specialCharacters',
|
'specialCharacters',
|
||||||
|
'emoji',
|
||||||
'|',
|
'|',
|
||||||
'undo',
|
'undo',
|
||||||
'redo',
|
'redo',
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import PartDBLabelEditing from "./PartDBLabelEditing";
|
||||||
|
|
||||||
import "./PartDBLabel.css";
|
import "./PartDBLabel.css";
|
||||||
|
|
||||||
import Plugin from "@ckeditor/ckeditor5-core/src/plugin";
|
import {Plugin} from "ckeditor5";
|
||||||
|
|
||||||
export default class PartDBLabel extends Plugin {
|
export default class PartDBLabel extends Plugin {
|
||||||
static get requires() {
|
static get requires() {
|
||||||
|
|
@ -32,4 +32,4 @@ export default class PartDBLabel extends Plugin {
|
||||||
static get pluginName() {
|
static get pluginName() {
|
||||||
return 'PartDBLabel';
|
return 'PartDBLabel';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Command from '@ckeditor/ckeditor5-core/src/command';
|
import {Command} from 'ckeditor5';
|
||||||
|
|
||||||
export default class PartDBLabelCommand extends Command {
|
export default class PartDBLabelCommand extends Command {
|
||||||
execute( { value } ) {
|
execute( { value } ) {
|
||||||
|
|
@ -47,4 +47,4 @@ export default class PartDBLabelCommand extends Command {
|
||||||
|
|
||||||
this.isEnabled = isAllowed;
|
this.isEnabled = isAllowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
import {Plugin} from 'ckeditor5';
|
||||||
import PartDBLabelCommand from "./PartDBLabelCommand";
|
import PartDBLabelCommand from "./PartDBLabelCommand";
|
||||||
|
|
||||||
import { toWidget } from '@ckeditor/ckeditor5-widget/src/utils';
|
import { toWidget } from 'ckeditor5';
|
||||||
import Widget from '@ckeditor/ckeditor5-widget/src/widget';
|
import {Widget} from 'ckeditor5';
|
||||||
|
|
||||||
export default class PartDBLabelEditing extends Plugin {
|
export default class PartDBLabelEditing extends Plugin {
|
||||||
static get requires() { // ADDED
|
static get requires() { // ADDED
|
||||||
|
|
@ -102,4 +102,4 @@ export default class PartDBLabelEditing extends Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
import {Plugin} from 'ckeditor5';
|
||||||
|
|
||||||
require('./lang/de.js');
|
require('./lang/de.js');
|
||||||
|
|
||||||
import { addListToDropdown, createDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils';
|
import { addListToDropdown, createDropdown } from 'ckeditor5';
|
||||||
|
|
||||||
import Collection from '@ckeditor/ckeditor5-utils/src/collection';
|
import {Collection} from 'ckeditor5';
|
||||||
import Model from '@ckeditor/ckeditor5-ui/src/model';
|
import {Model} from 'ckeditor5';
|
||||||
|
|
||||||
export default class PartDBLabelUI extends Plugin {
|
export default class PartDBLabelUI extends Plugin {
|
||||||
init() {
|
init() {
|
||||||
|
|
@ -187,4 +187,4 @@ function getDropdownItemsDefinitions(t) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return itemDefinitions;
|
return itemDefinitions;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Plugin } from 'ckeditor5/src/core';
|
import { Plugin } from 'ckeditor5';
|
||||||
import GFMDataProcessor from '@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor';
|
import {MarkdownGfmDataProcessor} from 'ckeditor5';
|
||||||
|
|
||||||
const ALLOWED_TAGS = [
|
const ALLOWED_TAGS = [
|
||||||
//Common elements
|
//Common elements
|
||||||
|
|
@ -34,7 +34,6 @@ const ALLOWED_TAGS = [
|
||||||
|
|
||||||
//Block elements
|
//Block elements
|
||||||
'span',
|
'span',
|
||||||
'p',
|
|
||||||
'img',
|
'img',
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -57,7 +56,7 @@ export default class ExtendedMarkdown extends Plugin {
|
||||||
constructor( editor ) {
|
constructor( editor ) {
|
||||||
super( editor );
|
super( editor );
|
||||||
|
|
||||||
editor.data.processor = new GFMDataProcessor( editor.data.viewDocument );
|
editor.data.processor = new MarkdownGfmDataProcessor( editor.data.viewDocument );
|
||||||
for (const tag of ALLOWED_TAGS) {
|
for (const tag of ALLOWED_TAGS) {
|
||||||
editor.data.processor.keepHtml(tag);
|
editor.data.processor.keepHtml(tag);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Plugin } from 'ckeditor5/src/core';
|
import {Plugin} from 'ckeditor5';
|
||||||
import GFMDataProcessor from '@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor';
|
import {MarkdownGfmDataProcessor} from 'ckeditor5';
|
||||||
|
|
||||||
const ALLOWED_TAGS = [
|
const ALLOWED_TAGS = [
|
||||||
//Common elements
|
//Common elements
|
||||||
|
|
@ -46,7 +46,7 @@ export default class ExtendedMarkdownInline extends Plugin {
|
||||||
constructor( editor ) {
|
constructor( editor ) {
|
||||||
super( editor );
|
super( editor );
|
||||||
|
|
||||||
editor.data.processor = new GFMDataProcessor( editor.data.viewDocument );
|
editor.data.processor = new MarkdownGfmDataProcessor( editor.data.viewDocument );
|
||||||
for (const tag of ALLOWED_TAGS) {
|
for (const tag of ALLOWED_TAGS) {
|
||||||
editor.data.processor.keepHtml(tag);
|
editor.data.processor.keepHtml(tag);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
import {Plugin} from 'ckeditor5';
|
||||||
|
|
||||||
export default class SingleLinePlugin extends Plugin {
|
export default class SingleLinePlugin extends Plugin {
|
||||||
init() {
|
init() {
|
||||||
|
|
@ -42,7 +42,7 @@ export default class SingleLinePlugin extends Plugin {
|
||||||
//We can not use the dataTransfer.setData method because the old object is somehow protected
|
//We can not use the dataTransfer.setData method because the old object is somehow protected
|
||||||
data.dataTransfer = new DataTransfer();
|
data.dataTransfer = new DataTransfer();
|
||||||
data.dataTransfer.setData("text", cleaned);
|
data.dataTransfer.setData("text", cleaned);
|
||||||
|
|
||||||
}, { priority: 'high' } );
|
}, { priority: 'high' } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,12 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters';
|
import SpecialCharacters from 'ckeditor5';
|
||||||
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials';
|
import SpecialCharactersEssentials from 'ckeditor5';
|
||||||
|
|
||||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
import {Plugin} from 'ckeditor5';
|
||||||
|
|
||||||
const emoji = require('emoji.json');
|
export default class SpecialCharactersGreek extends Plugin {
|
||||||
|
|
||||||
export default class SpecialCharactersEmoji extends Plugin {
|
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
const editor = this.editor;
|
const editor = this.editor;
|
||||||
|
|
@ -32,9 +30,6 @@ export default class SpecialCharactersEmoji extends Plugin {
|
||||||
|
|
||||||
//Add greek characters to special characters
|
//Add greek characters to special characters
|
||||||
specialCharsPlugin.addItems('Greek', this.getGreek());
|
specialCharsPlugin.addItems('Greek', this.getGreek());
|
||||||
|
|
||||||
//Add Emojis to special characters
|
|
||||||
specialCharsPlugin.addItems('Emoji', this.getEmojis());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getGreek() {
|
getGreek() {
|
||||||
|
|
@ -96,14 +91,4 @@ export default class SpecialCharactersEmoji extends Plugin {
|
||||||
{ title: 'san', character: 'Ϻ' },
|
{ title: 'san', character: 'Ϻ' },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
getEmojis() {
|
|
||||||
//Map our emoji data to the format the plugin expects
|
|
||||||
return emoji.map(emoji => {
|
|
||||||
return {
|
|
||||||
title: emoji.name,
|
|
||||||
character: emoji.char
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,9 @@ import { default as FullEditor } from "../../ckeditor/markdown_full";
|
||||||
import { default as SingleLineEditor} from "../../ckeditor/markdown_single_line";
|
import { default as SingleLineEditor} from "../../ckeditor/markdown_single_line";
|
||||||
import { default as HTMLLabelEditor } from "../../ckeditor/html_label";
|
import { default as HTMLLabelEditor } from "../../ckeditor/html_label";
|
||||||
|
|
||||||
import EditorWatchdog from '@ckeditor/ckeditor5-watchdog/src/editorwatchdog';
|
import {EditorWatchdog} from 'ckeditor5';
|
||||||
|
|
||||||
|
import "ckeditor5/ckeditor5.css";;
|
||||||
import "../../css/components/ckeditor.css";
|
import "../../css/components/ckeditor.css";
|
||||||
|
|
||||||
/* stimulusFetch: 'lazy' */
|
/* stimulusFetch: 'lazy' */
|
||||||
|
|
@ -51,9 +52,15 @@ export default class extends Controller {
|
||||||
|
|
||||||
const language = document.body.dataset.locale ?? "en";
|
const language = document.body.dataset.locale ?? "en";
|
||||||
|
|
||||||
|
const emojiURL = new URL('../../ckeditor/emojis.json', import.meta.url).href;
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
language: language,
|
language: language,
|
||||||
licenseKey: "GPL",
|
licenseKey: "GPL",
|
||||||
|
|
||||||
|
emoji: {
|
||||||
|
definitionsUrl: emojiURL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const watchdog = new EditorWatchdog();
|
const watchdog = new EditorWatchdog();
|
||||||
|
|
@ -84,4 +91,4 @@ export default class extends Controller {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
873
composer.lock
generated
873
composer.lock
generated
File diff suppressed because it is too large
Load diff
32
package.json
32
package.json
|
|
@ -33,38 +33,8 @@
|
||||||
"@algolia/autocomplete-js": "^1.17.0",
|
"@algolia/autocomplete-js": "^1.17.0",
|
||||||
"@algolia/autocomplete-plugin-recent-searches": "^1.17.0",
|
"@algolia/autocomplete-plugin-recent-searches": "^1.17.0",
|
||||||
"@algolia/autocomplete-theme-classic": "^1.17.0",
|
"@algolia/autocomplete-theme-classic": "^1.17.0",
|
||||||
"@ckeditor/ckeditor5-alignment": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-autoformat": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-basic-styles": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-block-quote": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-code-block": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-dev-translations": "^43.0.1",
|
"@ckeditor/ckeditor5-dev-translations": "^43.0.1",
|
||||||
"@ckeditor/ckeditor5-dev-utils": "^43.0.1",
|
"@ckeditor/ckeditor5-dev-utils": "^43.0.1",
|
||||||
"@ckeditor/ckeditor5-editor-classic": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-essentials": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-find-and-replace": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-font": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-heading": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-highlight": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-horizontal-line": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-html-embed": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-html-support": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-image": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-indent": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-link": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-list": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-markdown-gfm": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-media-embed": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-paragraph": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-paste-from-office": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-remove-format": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-source-editing": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-special-characters": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-table": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-theme-lark": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-upload": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-watchdog": "^44.0.0",
|
|
||||||
"@ckeditor/ckeditor5-word-count": "^44.0.0",
|
|
||||||
"@jbtronics/bs-treeview": "^1.0.1",
|
"@jbtronics/bs-treeview": "^1.0.1",
|
||||||
"@part-db/html5-qrcode": "^3.1.0",
|
"@part-db/html5-qrcode": "^3.1.0",
|
||||||
"@zxcvbn-ts/core": "^3.0.2",
|
"@zxcvbn-ts/core": "^3.0.2",
|
||||||
|
|
@ -77,6 +47,7 @@
|
||||||
"bootbox": "^6.0.0",
|
"bootbox": "^6.0.0",
|
||||||
"bootswatch": "^5.1.3",
|
"bootswatch": "^5.1.3",
|
||||||
"bs-custom-file-input": "^1.3.4",
|
"bs-custom-file-input": "^1.3.4",
|
||||||
|
"ckeditor5": "^46.0.0",
|
||||||
"clipboard": "^2.0.4",
|
"clipboard": "^2.0.4",
|
||||||
"compression-webpack-plugin": "^11.1.0",
|
"compression-webpack-plugin": "^11.1.0",
|
||||||
"datatables.net": "^2.0.0",
|
"datatables.net": "^2.0.0",
|
||||||
|
|
@ -87,7 +58,6 @@
|
||||||
"datatables.net-responsive-bs5": "^3.0.0",
|
"datatables.net-responsive-bs5": "^3.0.0",
|
||||||
"datatables.net-select-bs5": "^2.0.0",
|
"datatables.net-select-bs5": "^2.0.0",
|
||||||
"dompurify": "^3.0.3",
|
"dompurify": "^3.0.3",
|
||||||
"emoji.json": "^15.0.0",
|
|
||||||
"exports-loader": "^5.0.0",
|
"exports-loader": "^5.0.0",
|
||||||
"json-formatter-js": "^2.3.4",
|
"json-formatter-js": "^2.3.4",
|
||||||
"jszip": "^3.2.0",
|
"jszip": "^3.2.0",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue