inline-editor.js 745 B

123456789101112131415161718192021222324
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console, window, document */
  6. import InlineEditor from '@ckeditor/ckeditor5-editor-inline/src/inlineeditor';
  7. import ArticlePreset from '@ckeditor/ckeditor5-presets/src/article';
  8. InlineEditor.create( document.querySelector( '#snippet-inline-editor' ), {
  9. plugins: [ ArticlePreset ],
  10. toolbar: [ 'headings', 'bold', 'italic', 'link', 'unlink', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
  11. image: {
  12. toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ]
  13. }
  14. } )
  15. .then( editor => {
  16. window.editor = editor;
  17. } )
  18. .catch( err => {
  19. console.error( err.stack );
  20. } );