是否可以在提交按钮上单击上传图像,而不是使用Ckeditor5和Ckfinder直接上传到服务器?

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.

duangekui7451
duangekui7451 是的,你是对的。你知道有什么方法可以解决这个问题吗?
一年多之前 回复
douzi8112
douzi8112 只是为了澄清:你想将图像插入编辑器,但你不想立即上传,但只有当内容保存在服务器上时,对吧?
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐