8
0

alternatetext.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* global document, console, window */
  6. import ClassicEditor from 'ckeditor5-editor-classic/src/classic';
  7. import EnterPlugin from 'ckeditor5-enter/src/enter';
  8. import TypingPlugin from 'ckeditor5-typing/src/typing';
  9. import ParagraphPlugin from 'ckeditor5-paragraph/src/paragraph';
  10. import HeadingPlugin from 'ckeditor5-heading/src/heading';
  11. import ImagePlugin from 'ckeditor5-image/src/image';
  12. import UndoPlugin from 'ckeditor5-undo/src/undo';
  13. import ClipboardPlugin from 'ckeditor5-clipboard/src/clipboard';
  14. import ImageToolbar from 'ckeditor5-image/src/imagetoolbar';
  15. ClassicEditor.create( document.querySelector( '#editor' ), {
  16. plugins: [ EnterPlugin, TypingPlugin, ParagraphPlugin, HeadingPlugin, ImagePlugin, UndoPlugin, ClipboardPlugin, ImageToolbar ],
  17. toolbar: [ 'headings', 'undo', 'redo', 'imageAlternateText' ],
  18. image: {
  19. toolbar: [ 'imageAlternateText' ]
  20. }
  21. } )
  22. .then( editor => {
  23. window.editor = editor;
  24. } )
  25. .catch( err => {
  26. console.error( err.stack );
  27. } );