|
@@ -0,0 +1,45 @@
|
|
|
|
|
+/**
|
|
|
|
|
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
|
|
|
+ * For licensing, see LICENSE.md.
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+/* globals window, document, console:false */
|
|
|
|
|
+
|
|
|
|
|
+import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
|
|
|
|
|
+import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
|
|
|
|
|
+import List from '@ckeditor/ckeditor5-list/src/list';
|
|
|
|
|
+import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
|
|
|
|
+import Heading from '@ckeditor/ckeditor5-heading/src/heading';
|
|
|
|
|
+import HeadingButtonsUI from '@ckeditor/ckeditor5-heading/src/headingbuttonsui';
|
|
|
|
|
+import ParagraphButtonUI from '@ckeditor/ckeditor5-paragraph/src/paragraphbuttonui';
|
|
|
|
|
+import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
|
|
|
|
+import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
|
|
|
|
|
+import Link from '@ckeditor/ckeditor5-link/src/link';
|
|
|
|
|
+
|
|
|
|
|
+import BlockToolbar from '../../../../src/toolbar/block/blocktoolbar';
|
|
|
|
|
+import BalloonToolbar from '../../../../src/toolbar/balloon/balloontoolbar';
|
|
|
|
|
+
|
|
|
|
|
+BalloonEditor
|
|
|
|
|
+ .create( document.querySelector( '#editor' ), {
|
|
|
|
|
+ plugins: [
|
|
|
|
|
+ Essentials,
|
|
|
|
|
+ List,
|
|
|
|
|
+ Paragraph,
|
|
|
|
|
+ Heading,
|
|
|
|
|
+ HeadingButtonsUI,
|
|
|
|
|
+ ParagraphButtonUI,
|
|
|
|
|
+ Bold,
|
|
|
|
|
+ Italic,
|
|
|
|
|
+ Link,
|
|
|
|
|
+ BlockToolbar,
|
|
|
|
|
+ BalloonToolbar
|
|
|
|
|
+ ],
|
|
|
|
|
+ blockToolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3', 'bulletedList', 'numberedList' ],
|
|
|
|
|
+ balloonToolbar: [ 'bold', 'italic', 'link' ]
|
|
|
|
|
+ } )
|
|
|
|
|
+ .then( editor => {
|
|
|
|
|
+ window.editor = editor;
|
|
|
|
|
+ } )
|
|
|
|
|
+ .catch( err => {
|
|
|
|
|
+ console.error( err.stack );
|
|
|
|
|
+ } );
|