|
@@ -0,0 +1,37 @@
|
|
|
|
|
+/**
|
|
|
|
|
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
|
|
|
+ * For licensing, see LICENSE.md.
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+/* globals console, window, document */
|
|
|
|
|
+
|
|
|
|
|
+import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
|
|
|
|
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
|
|
|
|
|
+import Table from '../../src/table';
|
|
|
|
|
+import TableToolbar from '../../src/tabletoolbar';
|
|
|
|
|
+import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';
|
|
|
|
|
+import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption';
|
|
|
|
|
+import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle';
|
|
|
|
|
+import Image from '@ckeditor/ckeditor5-image/src/image';
|
|
|
|
|
+
|
|
|
|
|
+ClassicEditor
|
|
|
|
|
+ .create( document.querySelector( '#editor' ), {
|
|
|
|
|
+ plugins: [ ArticlePluginSet, Table, TableToolbar, Alignment, Image, ImageCaption, ImageStyle ],
|
|
|
|
|
+ toolbar: [
|
|
|
|
|
+ 'heading', '|', 'insertTable', '|', 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote',
|
|
|
|
|
+ 'alignment', 'insertImage',
|
|
|
|
|
+ '|', 'undo', 'redo'
|
|
|
|
|
+ ],
|
|
|
|
|
+ image: {
|
|
|
|
|
+ toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
|
|
|
|
|
+ },
|
|
|
|
|
+ table: {
|
|
|
|
|
+ toolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
|
|
|
|
|
+ }
|
|
|
|
|
+ } )
|
|
|
|
|
+ .then( editor => {
|
|
|
|
|
+ window.editor = editor;
|
|
|
|
|
+ } )
|
|
|
|
|
+ .catch( err => {
|
|
|
|
|
+ console.error( err.stack );
|
|
|
|
|
+ } );
|