balloon-toolbar-editor.js 785 B

12345678910111213141516171819202122232425
  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 BalloonToolbarEditor from '@ckeditor/ckeditor5-editor-balloon-toolbar/src/balloontoolbareditor';
  7. import ArticlePreset from '@ckeditor/ckeditor5-presets/src/article';
  8. BalloonToolbarEditor
  9. .create( document.querySelector( '#snippet-balloon-toolbar-editor' ), {
  10. plugins: [ ArticlePreset ],
  11. toolbar: [ 'headings', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
  12. image: {
  13. toolbar: [ 'imageStyleFull', 'imageStyleSide', '|', 'imageTextAlternative' ]
  14. }
  15. } )
  16. .then( editor => {
  17. window.editor = editor;
  18. } )
  19. .catch( err => {
  20. console.error( err );
  21. } );