link.js 691 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /* globals console, window, document, ClassicEditor, CS_CONFIG */
  6. ClassicEditor
  7. .create( document.querySelector( '#snippet-link' ), {
  8. cloudServices: CS_CONFIG,
  9. toolbar: {
  10. items: [
  11. 'heading',
  12. '|',
  13. 'bold',
  14. 'italic',
  15. 'link',
  16. 'bulletedList',
  17. 'numberedList',
  18. 'blockQuote',
  19. 'undo',
  20. 'redo'
  21. ],
  22. viewportTopOffset: window.getViewportTopOffsetConfig()
  23. }
  24. } )
  25. .then( editor => {
  26. window.editor = editor;
  27. } )
  28. .catch( err => {
  29. console.error( err.stack );
  30. } );