custom-highlight-options.js 777 B

123456789101112131415161718192021222324252627
  1. /**
  2. * @license Copyright (c) 2003-2018, 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-highlight-options' ), {
  8. toolbar: {
  9. items: [
  10. 'headings', '|', 'bulletedList', 'numberedList', 'highlightDropdown', 'undo', 'redo'
  11. ],
  12. viewportTopOffset: 60
  13. },
  14. highlight: {
  15. options: [
  16. { model: 'greenMarker', class: 'marker-green', title: 'Green marker', color: '#66ff00', type: 'marker' },
  17. { model: 'bluePen', class: 'pen-blue', title: 'Blue pen', color: '#0091ff', type: 'pen' }
  18. ]
  19. }
  20. } )
  21. .then( editor => {
  22. window.editor = editor;
  23. } )
  24. .catch( err => {
  25. console.error( err.stack );
  26. } );