0

I am using Ckeditor5 with Ckfinder to upload an image to the server. The default classic editor is working fine.

Below is my code snippet:

<script>

    var myEditor;

    ClassicEditor
       .create( document.querySelector( '#editor' ), {
           ckfinder: {
                        uploadUrl: 'url'
           }, 

           toolbar: [ 'imageUpload' ]
       } )
       .then( editor => {
            console.log( 'Editor was initialized', editor );
            myEditor = editor;
        })
       .catch( function( error ) {
            console.error( error );
        } );

</script>

I am able to upload an image to the server directly at this point but my requirement is to upload it on submit button click. I researched but unable to find any clue or solution about this. Is it possible or not with Ckeditor5 and Ckfinder at this point? Any help will be appreciated. Thank you.

JCode
  • 11
  • 1
  • 7
  • Just to clarify: you want to insert the image to the editor but you do not want to upload it right away but only when the content is saved on server, right? – jodator Jan 02 '19 at 07:49
  • @jodator yes, you are right. Do you know any way to get this workaround? – JCode Jan 02 '19 at 08:29

0 Answers0