|
|
@@ -5,48 +5,16 @@
|
|
|
|
|
|
/* globals console, window, document */
|
|
|
|
|
|
-import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
|
|
-import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
|
|
|
-import UploadAdapter from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
|
|
|
-import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
|
|
-import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
|
|
|
-import Heading from '@ckeditor/ckeditor5-heading/src/heading';
|
|
|
-import Image from '@ckeditor/ckeditor5-image/src/image';
|
|
|
-import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption';
|
|
|
-import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle';
|
|
|
-import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar';
|
|
|
-import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload';
|
|
|
-import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
|
|
-import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
|
|
|
+import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
|
|
|
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/base64uploadadapter';
|
|
|
|
|
|
+ClassicEditor.builtinPlugins.push( Base64UploadAdapter );
|
|
|
+
|
|
|
ClassicEditor
|
|
|
.create( document.querySelector( '#snippet-image-base64-upload' ), {
|
|
|
- plugins: [
|
|
|
- Essentials,
|
|
|
- UploadAdapter,
|
|
|
- Base64UploadAdapter,
|
|
|
- Bold,
|
|
|
- Italic,
|
|
|
- Heading,
|
|
|
- Image,
|
|
|
- ImageCaption,
|
|
|
- ImageStyle,
|
|
|
- ImageToolbar,
|
|
|
- ImageUpload,
|
|
|
- Paragraph,
|
|
|
- PasteFromOffice
|
|
|
- ],
|
|
|
toolbar: {
|
|
|
- items: [
|
|
|
- 'heading', '|', 'bold', 'italic', 'imageUpload', 'undo', 'redo'
|
|
|
- ],
|
|
|
viewportTopOffset: window.getViewportTopOffsetConfig()
|
|
|
- },
|
|
|
- image: {
|
|
|
- toolbar: [ 'imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight' ],
|
|
|
- styles: [ 'full', 'alignLeft', 'alignRight' ]
|
|
|
- },
|
|
|
+ }
|
|
|
} )
|
|
|
.then( editor => {
|
|
|
window.editor = editor;
|