delete.js 759 B

1234567891011121314151617181920212223242526
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console, window, document */
  6. import ClassicEditor from '/ckeditor5/editor-classic/classic.js';
  7. import { getData } from '/ckeditor5/engine/dev-utils/model.js';
  8. window.getData = getData;
  9. window.setInterval( function() {
  10. console.log( getData( window.editor.document ) );
  11. }, 3000 );
  12. ClassicEditor.create( document.querySelector( '#editor' ), {
  13. features: [ 'enter', 'typing', 'paragraph', 'undo', 'basic-styles/bold', 'basic-styles/italic', 'heading' ],
  14. toolbar: [ 'headings', 'bold', 'italic', 'undo', 'redo' ]
  15. } )
  16. .then( editor => {
  17. window.editor = editor;
  18. } )
  19. .catch( err => {
  20. console.error( err.stack );
  21. } );