imagestyle.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. /* global document, console, 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-semantic' ), {
  10. plugins: [
  11. ArticlePluginSet
  12. ],
  13. toolbar: [ 'heading', '|', 'undo', 'redo' ],
  14. image: {
  15. toolbar: [ 'imageStyle:full', 'imageStyle:side' ]
  16. }
  17. } )
  18. .then( editor => {
  19. window.editorSemantic = editor;
  20. } )
  21. .catch( err => {
  22. console.error( err.stack );
  23. } );
  24. ClassicEditor
  25. .create( document.querySelector( '#editor-formatting' ), {
  26. plugins: [
  27. ArticlePluginSet
  28. ],
  29. toolbar: [ 'heading', '|', 'undo', 'redo' ],
  30. image: {
  31. styles: [ 'alignLeft', 'alignCenter', 'alignRight' ],
  32. toolbar: [ 'imageStyle:alignLeft', 'imageStyle:alignCenter', 'imageStyle:alignRight' ]
  33. }
  34. } )
  35. .then( editor => {
  36. window.editorFormatting = editor;
  37. } )
  38. .catch( err => {
  39. console.error( err.stack );
  40. } );