image-caption.js 471 B

1234567891011121314151617181920
  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-image-caption' ), {
  8. removePlugins: [ 'ImageStyle' ],
  9. image: {
  10. toolbar: [ 'imageTextAlternative' ]
  11. }
  12. } )
  13. .then( editor => {
  14. window.editorCaption = editor;
  15. } )
  16. .catch( err => {
  17. console.error( err.stack );
  18. } );