douqudi5282 2018-12-24 06:54
浏览 185

是否可以在提交按钮上单击上传图像,而不是使用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.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Matlab问题解答有两个问题
    • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
    • ¥15 LCD12864中文显示
    • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
    • ¥15 gsoap生成onvif框架
    • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
    • ¥15 stm32的can接口不能收发数据
    • ¥15 目标检测算法移植到arm开发板
    • ¥15 利用JD51设计温度报警系统
    • ¥15 快手联盟怎么快速的跑出建立模型