ckfinder.js 861 B

12345678910111213141516171819202122232425262728293031
  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. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-ckfinder' ), {
  9. cloudServices: CS_CONFIG,
  10. toolbar: {
  11. items: [
  12. 'ckfinder', '|', 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo'
  13. ],
  14. viewportTopOffset: 100
  15. },
  16. ckfinder: {
  17. // eslint-disable-next-line max-len
  18. uploadUrl: 'https://cksource.com/weuy2g4ryt278ywiue/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json',
  19. width: 800,
  20. height: 600
  21. }
  22. } )
  23. .then( editor => {
  24. window.editor = editor;
  25. } )
  26. .catch( err => {
  27. console.error( err.stack );
  28. } );