corelibs/ckeditor/app.js

80 lines
3.2 KiB
JavaScript
Raw Normal View History

2024-05-23 14:34:00 -04:00
import {ClassicEditor as CKClassicEditor} from "@ckeditor/ckeditor5-editor-classic";
import {Alignment} from "@ckeditor/ckeditor5-alignment";
import {Autoformat} from "@ckeditor/ckeditor5-autoformat";
import {Bold, Italic, Underline, Strikethrough, Code, Subscript, Superscript}
from "@ckeditor/ckeditor5-basic-styles";
import {BlockQuote} from "@ckeditor/ckeditor5-block-quote";
import {CodeBlock} from "@ckeditor/ckeditor5-code-block";
import {Essentials} from "@ckeditor/ckeditor5-essentials";
import {FontFamily, FontBackgroundColor, FontColor, FontSize}
from "@ckeditor/ckeditor5-font";
import {Heading} from "@ckeditor/ckeditor5-heading";
import {HorizontalLine} from "@ckeditor/ckeditor5-horizontal-line";
import {HtmlEmbed} from "@ckeditor/ckeditor5-html-embed";
import {Image, ImageCaption, ImageStyle, ImageToolbar, ImageInsert}
from "@ckeditor/ckeditor5-image";
import {Indent} from "@ckeditor/ckeditor5-indent";
import {Link} from "@ckeditor/ckeditor5-link";
import {List} from "@ckeditor/ckeditor5-list";
import {MediaEmbed} from "@ckeditor/ckeditor5-media-embed";
import {Paragraph} from "@ckeditor/ckeditor5-paragraph";
import {ShowBlocks} from "@ckeditor/ckeditor5-show-blocks";
import {SourceEditing} from "@ckeditor/ckeditor5-source-editing";
2024-05-23 14:50:53 -04:00
import {
SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersLatin,
SpecialCharactersMathematical, SpecialCharactersText, SpecialCharactersEssentials
} from "@ckeditor/ckeditor5-special-characters";
2024-05-23 14:34:00 -04:00
import {Table, TableCellProperties, TableProperties, TableToolbar, TableCaption, TableColumnResize}
from "@ckeditor/ckeditor5-table";
import {TextTransformation} from "@ckeditor/ckeditor5-typing";
class ClassicEditor extends CKClassicEditor {
static builtinPlugins = [
Alignment, Autoformat, BlockQuote, Bold, CodeBlock,
Essentials, FontFamily, FontSize, FontColor, FontBackgroundColor,
Heading, HorizontalLine, HtmlEmbed,
Image, ImageCaption, ImageStyle, ImageToolbar, ImageInsert,
2024-05-23 14:50:53 -04:00
Indent, Italic, Link, List, MediaEmbed, Paragraph, ShowBlocks, SourceEditing,
SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersLatin,
SpecialCharactersMathematical, SpecialCharactersText, SpecialCharactersEssentials,
Table, TableToolbar, TextTransformation,
2024-05-23 14:34:00 -04:00
Underline, Strikethrough, Code, Subscript, Superscript
];
static defaultConfig = {
toolbar: {
items: [
"undo", "redo", "showBlocks", "sourceEditing", "|",
"fontFamily", "fontSize", "fontColor", "fontBackgroundColor",
"bold", "italic", "underline", "strikethrough", "subscript", "superscript", "code", "-",
"bulletedList", "numberedList", "outdent", "indent", "alignment", "|",
"heading", "link", "blockQuote", "insertTable", "specialCharacters", "|",
"codeBlock", "mediaEmbed", "insertImage", "htmlEmbed"
],
shouldNotGroupWhenFull: true
},
language: "en",
image: {
toolbar: [
"imageTextAlternative",
"toggleImageCaption",
"imageStyle:inline",
"imageStyle:block",
"imageStyle:side"
]
},
table: {
contentToolbar: [
"tableColumn",
"tableRow",
"mergeTableCells"
]
}
};
}
window.ClassicEditor = ClassicEditor;
export default ClassicEditor;