basic-styles.js 771 B

12345678910111213141516171819202122232425
  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 ClassicEditor, console, window, document */
  6. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config.js';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-basic-styles' ), {
  9. toolbar: {
  10. items: [
  11. 'bold', 'italic', 'underline', 'strikethrough', 'subscript', 'superscript', 'code', '|', 'removeFormat', '|', 'undo', 'redo'
  12. ],
  13. viewportTopOffset: window.getViewportTopOffsetConfig()
  14. },
  15. cloudServices: CS_CONFIG
  16. } )
  17. .then( editor => {
  18. window.editor = editor;
  19. } )
  20. .catch( err => {
  21. console.error( err );
  22. } );