custom-text-alignment-options.js 587 B

12345678910111213141516171819202122232425
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals ClassicEditor, console, window, document */
  6. ClassicEditor
  7. .create( document.querySelector( '#snippet-custom-text-alignment-options' ), {
  8. toolbar: {
  9. items: [
  10. 'headings', 'bulletedList', 'numberedList', 'alignmentDropdown', 'undo', 'redo'
  11. ],
  12. viewportTopOffset: 60
  13. },
  14. alignment: {
  15. options: [ 'left', 'right' ]
  16. }
  17. } )
  18. .then( editor => {
  19. window.editor = editor;
  20. } )
  21. .catch( err => {
  22. console.error( err.stack );
  23. } );