article.js 599 B

123456789101112131415161718192021
  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 ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classic';
  7. import ArticlePreset from '../../src/article';
  8. ClassicEditor.create( document.querySelector( '#editor' ), {
  9. plugins: [ ArticlePreset ],
  10. toolbar: [ 'headings', 'bold', 'italic', 'link', 'unlink', 'bulletedList', 'numberedList', 'undo', 'redo' ]
  11. } )
  12. .then( editor => {
  13. window.editor = editor;
  14. } )
  15. .catch( err => {
  16. console.error( err.stack );
  17. } );