Untitled

 avatar
unknown
typescript
a year ago
3.0 kB
5
Indexable
/**
 * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */

// The editor creator to use.
import { ClassicEditor as ClassicEditorBase } from "@ckeditor/ckeditor5-editor-classic";
import type { EditorConfig } from "@ckeditor/ckeditor5-core";

// Keep sorted by import group/import.

// neMedIO libraries
import AttachmentUpload from "./nemedio/attachmentupload";

// CKEditor libraries
import { Autoformat } from "@ckeditor/ckeditor5-autoformat";
import { Autosave } from "@ckeditor/ckeditor5-autosave";
import { Alignment } from "@ckeditor/ckeditor5-alignment";
import { BlockQuote } from "@ckeditor/ckeditor5-block-quote";
import {
	Bold,
	Italic,
	Strikethrough,
	Subscript,
	Superscript,
	Underline,
} from "@ckeditor/ckeditor5-basic-styles";

// Requires a license
import { Comments } from "@ckeditor/ckeditor5-comments";
import { TrackChanges } from "@ckeditor/ckeditor5-track-changes";

import { Essentials } from "@ckeditor/ckeditor5-essentials";
import { Font } from "@ckeditor/ckeditor5-font";
import { Heading } from "@ckeditor/ckeditor5-heading";
import Highlight from "@ckeditor/ckeditor5-highlight/src/highlight";
import {
	Image,
	ImageResize,
	ImageCaption,
	ImageStyle,
	ImageToolbar,
	ImageUpload,
} from "@ckeditor/ckeditor5-image";
import { Link } from "@ckeditor/ckeditor5-link";
import { List } from "@ckeditor/ckeditor5-list";
import { TodoList } from "@ckeditor/ckeditor5-list";
import { MediaEmbed } from "@ckeditor/ckeditor5-media-embed";
import { PageBreak } from "@ckeditor/ckeditor5-page-break";
import { Paragraph } from "@ckeditor/ckeditor5-paragraph";
import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
import {
	Table,
	TableToolbar,
	TableProperties,
	TableCellProperties,
	TableColumnResize,
	TableCaption,
} from "@ckeditor/ckeditor5-table";

export default class ClassicEditor extends ClassicEditorBase {
	// Plugins to include in the build.
	// Keep sorted.
	public static override builtinPlugins = [
		AttachmentUpload,
		Autosave,
		Autoformat,
		Alignment,
		BlockQuote,
		Bold,
		Comments,
		Essentials,
		Font,
		Highlight,
		Heading,
		Image,
		ImageResize,
		ImageCaption,
		ImageStyle,
		ImageToolbar,
		ImageUpload,
		Italic,
		Link,
		List,
		MediaEmbed,
		PageBreak,
		Paragraph,
		PasteFromOffice,
		Strikethrough,
		Subscript,
		Superscript,
		Table,
		TableCaption,
		TableColumnResize,
		TableToolbar,
		TableProperties,
		TableCellProperties,
		TodoList,
		TrackChanges,
		Underline,
	];

	// Editor configuration.
	public static override defaultConfig: EditorConfig = {
		language: "en", // This value must be kept in sync with the language defined in webpack.config.js.
		licenseKey: "", // licenseKey
		comments: {
			editorConfig: {
				// The list of plugins that will be included in the comments editors.
				extraPlugins: [Bold, Italic, List, Autoformat],
			},
		},
	};
}
Leave a Comment