簡體   English   中英

CKEditor5 和 CKFinder

[英]CkEditor5 and CKFinder

我希望這是一個非常基本的問題。

當我嘗試使用 CKeditor 5 添加圖像時,控制台中不斷收到“無上傳適配器”錯誤消息 - 閱讀更多: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error- code.html#error-filerepository-no-upload-adapter

以下是文檔中的說明。

僅配置圖片上傳 借助 CKFinder 上傳適配器,此功能可以自動將圖片上傳到服務器(例如,當圖片被放入內容中時)。 它只需要正確的 config.ckfinder.uploadUrl 路徑。 假設在https://example.com/ckfinder/下安裝(可用)CKFinder PHP 服務器端連接器,請使用以下快速上傳命令 ZE6B391A8D2C4D45902A23A8B6Z58 啟用圖像上傳:

import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        plugins: [ CKFinder, ... ],

        // Enable the "Insert image" button in the toolbar.
        toolbar: [ 'uploadImage', ... ],

        ckfinder: {
            // Upload the images to the server using the CKFinder QuickUpload command.
           uploadUrl: 'https://example.com/ckfinder/core/connector/php/connector.php? command=QuickUpload&type=Images&responseType=json'
        }
    } )
    .then( ... )
    .catch( ... );

我已將上述代碼添加到我的編輯器存在於標簽中的網頁上。 我做錯了嗎? 是否應該將此代碼添加到其他地方,在我缺少的其他地方的配置文件中?

鏈接到相關文檔 - https://ckeditor.com/docs/ckeditor5/latest/features/image-upload/ckfinder.html

如果我將 go 轉到示例頁面 - http://example.com/ckfinder/samples/full-page-open.html ,則上傳程序工作正常

沒有得到這個工作,所以使用https://github.com/ckfinder/ckfinder-laravel-package代替。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM