special-characters.js 1.3 KB

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