1.js 807 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /* globals console:false, document, window */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
  8. ClassicEditor
  9. .create( document.querySelector( '#editor' ), {
  10. plugins: [ ArticlePluginSet ],
  11. toolbar: [ 'undo', 'redo', 'link' ],
  12. link: {
  13. decorators: {
  14. isDownloadable: {
  15. mode: 'manual',
  16. label: 'Downloadable',
  17. attributes: {
  18. download: 'download'
  19. }
  20. }
  21. }
  22. }
  23. } )
  24. .then( newEditor => {
  25. window.editor = newEditor;
  26. } )
  27. .catch( err => console.error( err.stack ) );