UNPKG

ckeditor5-personalized-build

Version:
144 lines (137 loc) 3.18 kB
/** * @license Copyright (c) 2014-2023, 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'; import { Alignment } from '@ckeditor/ckeditor5-alignment'; import { Autoformat } from '@ckeditor/ckeditor5-autoformat'; import { Bold, Italic, Strikethrough, Subscript, Superscript, Underline } from '@ckeditor/ckeditor5-basic-styles'; import { BlockQuote } from '@ckeditor/ckeditor5-block-quote'; import { Essentials } from '@ckeditor/ckeditor5-essentials'; import { FontBackgroundColor, FontColor } from '@ckeditor/ckeditor5-font'; import { Heading } from '@ckeditor/ckeditor5-heading'; import { Highlight } from '@ckeditor/ckeditor5-highlight'; import { AutoImage, Image, ImageCaption, ImageStyle, ImageToolbar, ImageUpload, ImageResize, } from '@ckeditor/ckeditor5-image'; import { Indent, IndentBlock } from '@ckeditor/ckeditor5-indent'; import { Link, LinkImage } from '@ckeditor/ckeditor5-link'; import { ListProperties } from '@ckeditor/ckeditor5-list'; import { MediaEmbed } from '@ckeditor/ckeditor5-media-embed'; import { Paragraph } from '@ckeditor/ckeditor5-paragraph'; import { PasteFromOffice } from '@ckeditor/ckeditor5-paste-from-office'; import { Table, TableCaption, TableCellProperties, TableColumnResize, TableToolbar, TableProperties } from '@ckeditor/ckeditor5-table'; import { TextTransformation } from '@ckeditor/ckeditor5-typing'; // You can read more about extending the build with additional plugins in the "Installing plugins" guide. // See https://ckeditor.com/docs/ckeditor5/latest/installation/plugins/installing-plugins.html for details. class Editor extends ClassicEditor { public static override builtinPlugins = [ Alignment, AutoImage, Autoformat, BlockQuote, Bold, Essentials, FontBackgroundColor, FontColor, Heading, Highlight, Image, ImageCaption, ImageStyle, ImageToolbar, ImageUpload, ImageResize, Indent, IndentBlock, Italic, Link, LinkImage, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, Strikethrough, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, Underline ]; public static override defaultConfig = { toolbar: { items: [ 'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'fontBackgroundColor', 'fontColor', 'blockQuote', 'highlight', '|', 'alignment', 'bulletedList', 'numberedList', '|', 'heading', 'link', 'outdent', 'indent', '|', 'imageUpload', 'insertTable', 'undo', 'redo' ] }, language: 'en', image: { toolbar: [ 'imageTextAlternative', 'toggleImageCaption', 'imageStyle:inline', 'imageStyle:block', 'imageStyle:side', 'linkImage' ] }, table: { contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties', ], }, }; } export default Editor;