2017-08-09 130 views
-1

我正試圖用kcfinder在ckeditor中使用上傳功能。有沒有辦法修改ckeditor的上傳功能?

enter image description here

然而,這個目前的功能是,你需要先點擊「它發送到服務器」按鈕。爲了將圖像上傳到服務器。我不想刪除它,當我點擊確定按鈕時,它將上傳圖像並自動添加到內容中,不再調整大小或任何內容。無論如何要實現這個功能?

回答

0

您可以更改ckeditor在fileUploadRequestfileUploadResponse上所做的操作。如何使用這兩種反應的一個例子是這樣的:

<textarea name="editor1" id="editor1" rows="10" cols="80"></textarea> 
<script> 
    var ck = CKEDITOR.replace('editor1'); 
    ck.on('fileUploadRequest', function(evt) { 
     //custom code to remove image 
     //and upload content here 
    }); 
</script> 
相關問題