rtl.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  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:false, */
  6. import BalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
  7. import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
  8. import List from '@ckeditor/ckeditor5-list/src/list';
  9. import Image from '@ckeditor/ckeditor5-image/src/image';
  10. import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption';
  11. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  12. import Heading from '@ckeditor/ckeditor5-heading/src/heading';
  13. import HeadingButtonsUI from '@ckeditor/ckeditor5-heading/src/headingbuttonsui';
  14. import ParagraphButtonUI from '@ckeditor/ckeditor5-paragraph/src/paragraphbuttonui';
  15. import BlockToolbar from '../../../src/toolbar/block/blocktoolbar';
  16. BalloonEditor
  17. .create( document.querySelector( '#editor' ), {
  18. plugins: [ Essentials, List, Paragraph, Heading, Image, ImageCaption, HeadingButtonsUI, ParagraphButtonUI, BlockToolbar ],
  19. blockToolbar: [
  20. 'paragraph', 'heading1', 'heading2', 'heading3', 'bulletedList', 'numberedList', 'paragraph',
  21. 'heading1', 'heading2', 'heading3', 'bulletedList', 'numberedList', 'paragraph', 'heading1', 'heading2', 'heading3',
  22. 'bulletedList', 'numberedList'
  23. ],
  24. language: 'ar'
  25. } )
  26. .then( editor => {
  27. window.editor = editor;
  28. } )
  29. .catch( err => {
  30. console.error( err.stack );
  31. } );