link.js 530 B

1234567891011121314151617181920
  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. viewportTopOffset: window.getViewportTopOffsetConfig()
  11. }
  12. } )
  13. .then( editor => {
  14. window.editor = editor;
  15. } )
  16. .catch( err => {
  17. console.error( err.stack );
  18. } );