link.js 811 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals console:false, window, document */
  6. import ClassicEditor from '/ckeditor5/editor-classic/classic.js';
  7. ClassicEditor.create( document.querySelector( '#editor' ), {
  8. features: [ 'link', 'typing', 'paragraph', 'undo' ],
  9. toolbar: [ 'link', 'undo', 'redo' ]
  10. } )
  11. .then( editor => {
  12. window.editor = editor;
  13. } )
  14. .catch( err => {
  15. console.error( err.stack );
  16. } );
  17. ClassicEditor.create( document.querySelector( '#editor-balloon-demo' ), {
  18. features: [ 'link', 'typing', 'paragraph', 'undo' ],
  19. toolbar: [ 'link', 'undo', 'redo' ]
  20. } )
  21. .then( editor => {
  22. editor.ui.view.element.classList.add( 'ck-editor_balloon-demo' );
  23. } )
  24. .catch( err => {
  25. console.error( err.stack );
  26. } );