8
0

texttransformation.js 1004 B

123456789101112131415161718192021222324252627282930313233
  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. /* global console, window */
  6. import global from '@ckeditor/ckeditor5-utils/src/dom/global';
  7. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  8. import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
  9. import TextTransformation from '../../src/texttransformation';
  10. ClassicEditor
  11. .create( global.document.querySelector( '#editor' ), {
  12. plugins: [ ArticlePluginSet, TextTransformation ],
  13. toolbar: [
  14. 'heading',
  15. '|', 'bulletedList', 'numberedList', 'blockQuote',
  16. '|', 'bold', 'italic', 'link',
  17. '|', 'insertTable',
  18. '|', 'undo', 'redo'
  19. ],
  20. image: {
  21. toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
  22. }
  23. } )
  24. .then( editor => {
  25. window.editor = editor;
  26. } )
  27. .catch( err => {
  28. console.error( err.stack );
  29. } );