blockquote.js 813 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* global document, console, window */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import ArticlePreset from '@ckeditor/ckeditor5-presets/src/article';
  8. import { getData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
  9. ClassicEditor.create( document.querySelector( '#editor' ), {
  10. plugins: [
  11. ArticlePreset
  12. ],
  13. toolbar: [ 'headings', 'bold', 'italic', 'link', 'unlink', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ]
  14. } )
  15. .then( editor => {
  16. window.editor = editor;
  17. } )
  18. .catch( err => {
  19. console.error( err.stack );
  20. } );
  21. window.setInterval( function() {
  22. console.log( getData( window.editor.document ) );
  23. }, 3000 );