| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /**
- * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
- /* globals document, window, console */
- import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
- import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
- import Enter from '@ckeditor/ckeditor5-enter/src/enter';
- import Typing from '@ckeditor/ckeditor5-typing/src/typing';
- import Heading from '@ckeditor/ckeditor5-heading/src/heading';
- import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
- import Undo from '@ckeditor/ckeditor5-undo/src/undo';
- import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
- import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
- import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
- import Code from '@ckeditor/ckeditor5-basic-styles/src/code';
- import Link from '@ckeditor/ckeditor5-link/src/link';
- const config = {
- plugins: [ Enter, Typing, Paragraph, Undo, Heading, Bold, Italic, Strikethrough, Code, Link ],
- toolbar: [ 'headings', '|', 'bold', 'italic', 'strikethrough', 'code', 'link', '|', 'undo', 'redo' ]
- };
- ClassicEditor
- .create( document.querySelector( '#editor-classic' ), config )
- .then( editor => {
- window.classicEditor = editor;
- } )
- .catch( err => {
- console.error( err.stack );
- } );
- BalloonEditor
- .create( document.querySelector( '#editor-balloon' ), config )
- .then( editor => {
- window.balloonEditor = editor;
- } )
- .catch( err => {
- console.error( err.stack );
- } );
|