|
|
@@ -1,6 +1,6 @@
|
|
|
---
|
|
|
category: builds-integration
|
|
|
-order: 40
|
|
|
+order: 50
|
|
|
---
|
|
|
|
|
|
# Advanced setup
|
|
|
@@ -175,71 +175,69 @@ You can now import all the needed plugins and the creator directly into your cod
|
|
|
```js
|
|
|
import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
|
|
import EssentialsPlugin from '@ckeditor/ckeditor5-essentials/src/essentials';
|
|
|
-import UploadadapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
|
|
|
+import UploadAdapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
|
|
|
import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
|
|
|
import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
|
|
import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
|
|
|
-import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
|
|
|
-import EasyimagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
|
|
|
+import BlockQuotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
|
|
|
+import EasyImagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
|
|
|
import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
|
|
|
import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
|
|
|
-import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
|
|
|
-import ImagestylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
|
|
|
-import ImagetoolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
|
|
|
-import ImageuploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
|
|
|
+import ImageCaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
|
|
|
+import ImageStylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
|
|
|
+import ImageToolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
|
|
|
+import ImageUploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
|
|
|
import LinkPlugin from '@ckeditor/ckeditor5-link/src/link';
|
|
|
import ListPlugin from '@ckeditor/ckeditor5-list/src/list';
|
|
|
import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
|
|
|
|
|
export default class ClassicEditor extends ClassicEditorBase {}
|
|
|
|
|
|
-ClassicEditor.build = {
|
|
|
- plugins: [
|
|
|
- EssentialsPlugin,
|
|
|
- UploadadapterPlugin,
|
|
|
- AutoformatPlugin,
|
|
|
- BoldPlugin,
|
|
|
- ItalicPlugin,
|
|
|
- BlockquotePlugin,
|
|
|
- EasyimagePlugin,
|
|
|
- HeadingPlugin,
|
|
|
- ImagePlugin,
|
|
|
- ImagecaptionPlugin,
|
|
|
- ImagestylePlugin,
|
|
|
- ImagetoolbarPlugin,
|
|
|
- ImageuploadPlugin,
|
|
|
- LinkPlugin,
|
|
|
- ListPlugin,
|
|
|
- ParagraphPlugin
|
|
|
- ],
|
|
|
- config: {
|
|
|
- toolbar: {
|
|
|
- items: [
|
|
|
- 'heading',
|
|
|
- '|',
|
|
|
- 'bold',
|
|
|
- 'italic',
|
|
|
- 'link',
|
|
|
- 'bulletedList',
|
|
|
- 'numberedList',
|
|
|
- 'imageUpload',
|
|
|
- 'blockQuote',
|
|
|
- 'undo',
|
|
|
- 'redo'
|
|
|
- ]
|
|
|
- },
|
|
|
- image: {
|
|
|
- toolbar: [
|
|
|
- 'imageStyle:full',
|
|
|
- 'imageStyle:side',
|
|
|
- '|',
|
|
|
- 'imageTextAlternative'
|
|
|
- ]
|
|
|
- },
|
|
|
- language: 'en'
|
|
|
- }
|
|
|
+ClassicEditor.builtinPlugins = [
|
|
|
+ EssentialsPlugin,
|
|
|
+ UploadAdapterPlugin,
|
|
|
+ AutoformatPlugin,
|
|
|
+ BoldPlugin,
|
|
|
+ ItalicPlugin,
|
|
|
+ BlockQuotePlugin,
|
|
|
+ EasyImagePlugin,
|
|
|
+ HeadingPlugin,
|
|
|
+ ImagePlugin,
|
|
|
+ ImageCaptionPlugin,
|
|
|
+ ImageStylePlugin,
|
|
|
+ ImageToolbarPlugin,
|
|
|
+ ImageUploadPlugin,
|
|
|
+ LinkPlugin,
|
|
|
+ ListPlugin,
|
|
|
+ ParagraphPlugin
|
|
|
+];
|
|
|
+
|
|
|
+ClassicEditor.defaultConfig = {
|
|
|
+ toolbar: {
|
|
|
+ items: [
|
|
|
+ 'heading',
|
|
|
+ '|',
|
|
|
+ 'bold',
|
|
|
+ 'italic',
|
|
|
+ 'link',
|
|
|
+ 'bulletedList',
|
|
|
+ 'numberedList',
|
|
|
+ 'imageUpload',
|
|
|
+ 'blockQuote',
|
|
|
+ 'undo',
|
|
|
+ 'redo'
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ image: {
|
|
|
+ toolbar: [
|
|
|
+ 'imageStyle:full',
|
|
|
+ 'imageStyle:side',
|
|
|
+ '|',
|
|
|
+ 'imageTextAlternative'
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ language: 'en'
|
|
|
};
|
|
|
-
|
|
|
```
|
|
|
|
|
|
This module will export an editor creator class which has all the plugins and configuration that you need already built-in. To use such editor, simply import that class and call the static `.create()` method like in all {@link builds/guides/integration/basic-api#creating-an-editor examples}.
|
|
|
@@ -265,18 +263,18 @@ The second variant how to run the editor is to use the creator class directly, w
|
|
|
```js
|
|
|
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
|
|
import EssentialsPlugin from '@ckeditor/ckeditor5-essentials/src/essentials';
|
|
|
-import UploadadapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
|
|
|
+import UploadAdapterPlugin from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
|
|
|
import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
|
|
|
import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
|
|
import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
|
|
|
-import BlockquotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
|
|
|
-import EasyimagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
|
|
|
+import BlockQuotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote';
|
|
|
+import EasyImagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage';
|
|
|
import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
|
|
|
import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';
|
|
|
-import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
|
|
|
-import ImagestylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
|
|
|
-import ImagetoolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
|
|
|
-import ImageuploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
|
|
|
+import ImageCaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
|
|
|
+import ImageStylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
|
|
|
+import ImageToolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
|
|
|
+import ImageUploadPlugin from '@ckeditor/ckeditor5-image/src/imageupload';
|
|
|
import LinkPlugin from '@ckeditor/ckeditor5-link/src/link';
|
|
|
import ListPlugin from '@ckeditor/ckeditor5-list/src/list';
|
|
|
import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
|
|
@@ -289,12 +287,12 @@ ClassicEditor
|
|
|
AutoformatPlugin,
|
|
|
BoldPlugin,
|
|
|
ItalicPlugin,
|
|
|
- BlockquotePlugin,
|
|
|
+ BlockQuotePlugin,
|
|
|
HeadingPlugin,
|
|
|
ImagePlugin,
|
|
|
- ImagecaptionPlugin,
|
|
|
- ImagestylePlugin,
|
|
|
- ImagetoolbarPlugin,
|
|
|
+ ImageCaptionPlugin,
|
|
|
+ ImageStylePlugin,
|
|
|
+ ImageToolbarPlugin,
|
|
|
LinkPlugin,
|
|
|
ListPlugin,
|
|
|
ParagraphPlugin
|