|
|
@@ -2,24 +2,13 @@
|
|
|
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
|
|
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
|
*/
|
|
|
-
|
|
|
-/* globals console, document, window */
|
|
|
-
|
|
|
-import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
|
|
-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 HeadingButtonsUI from '@ckeditor/ckeditor5-heading/src/headingbuttonsui';
|
|
|
-import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
|
|
-import ParagraphButtonUI from '@ckeditor/ckeditor5-paragraph/src/paragraphbuttonui';
|
|
|
-import Undo from '@ckeditor/ckeditor5-undo/src/undo';
|
|
|
-
|
|
|
+/* globals ClassicEditor, console, document, window */
|
|
|
ClassicEditor
|
|
|
- .create( document.querySelector( '#editor' ), {
|
|
|
- plugins: [ Enter, Typing, Undo, Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ],
|
|
|
- toolbar: [ 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6' ],
|
|
|
+ .create( document.querySelector( '#snippet-heading-buttons' ), {
|
|
|
+ toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6', '|', 'undo', 'redo' ],
|
|
|
heading: {
|
|
|
options: [
|
|
|
+ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
|
|
|
{ model: 'heading1', view: 'h2', title: 'Heading 1', class: 'ck-heading_heading1' },
|
|
|
{ model: 'heading2', view: 'h3', title: 'Heading 2', class: 'ck-heading_heading2' },
|
|
|
{ model: 'heading3', view: 'h4', title: 'Heading 3', class: 'ck-heading_heading3' },
|