special-characters.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 window, document, console, ClassicEditor, SpecialCharactersEssentials */
  6. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-special-characters' ), {
  9. extraPlugins: [ SpecialCharactersEssentials ],
  10. toolbar: {
  11. items: [
  12. 'heading',
  13. '|',
  14. 'bold',
  15. 'italic',
  16. 'bulletedList',
  17. 'numberedList',
  18. '|',
  19. 'outdent',
  20. 'indent',
  21. '|',
  22. 'specialCharacters',
  23. 'blockQuote',
  24. 'link',
  25. 'imageUpload',
  26. 'mediaEmbed',
  27. 'insertTable',
  28. '|',
  29. 'undo',
  30. 'redo'
  31. ],
  32. viewportTopOffset: window.getViewportTopOffsetConfig()
  33. },
  34. image: {
  35. styles: [
  36. 'full',
  37. 'alignLeft',
  38. 'alignRight'
  39. ],
  40. toolbar: [
  41. 'imageStyle:alignLeft',
  42. 'imageStyle:full',
  43. 'imageStyle:alignRight',
  44. '|',
  45. 'imageTextAlternative'
  46. ]
  47. },
  48. table: {
  49. contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
  50. },
  51. cloudServices: CS_CONFIG
  52. } )
  53. .then( editor => {
  54. window.editor = editor;
  55. } )
  56. .catch( err => {
  57. console.error( err.stack );
  58. } );