CKFinder问题Uncaught TypeError:无法使用CKEditor 5读取未定义的属性'modal' - Vue js

问题描述 投票:0回答:1

我正在尝试将CKFinder集成到Vue js应用程序中。但是面对这个问题Uncaught TypeError:无法读取undefined的属性'modal'。

我正在关注Vaz js的CKEditor5 / CKFinder的official documentation

这里是ckfinder配置。

    ckfinder: {
        // Define the CKFinder configuration (if necessary).
        options: {
            resourceType: 'Images'
        },
    }

这是浏览器控制台中显示的完整错误消息。

Uncaught TypeError: Cannot read property 'modal' of undefined
    at CKFinderCommand.execute (ckfindercommand.js?9ed3:153)
    at CKFinderCommand.eval (observablemixin.js?3466:268)
    at CKFinderCommand.fire (emittermixin.js?e4c7:236)
    at CKFinderCommand.(:9191/anonymous function) [as execute] (webpack-internal:///./node_modules/@ckeditor/ckeditor5-utils/src/observablemixin.js:296:19)
    at CommandCollection.execute (commandcollection.js?e961:92)
    at ClassicEditor.execute (editor.js?7e01:299)
    at ButtonView.eval (ckfinderui.js?8a75:47)
    at ButtonView.fire (emittermixin.js?e4c7:236)
    at TemplateToBinding.eval (buttonview.js?d175:167)
    at ProxyEmitter.callback (template.js?56c1:1208)
javascript vue.js ckeditor ckfinder ckeditor5
1个回答
0
投票

您需要先将CKFinder附加到您的页面,因此CKEditor 5可以使用它。

最简单的方法是使用脚本标记:

<script src="https://example.com/ckfinder/ckfinder.js"></script>

更多信息:https://ckeditor.com/docs/ckeditor5/latest/features/image-upload/ckfinder.html#configuring-the-full-integration

© www.soinside.com 2019 - 2024. All rights reserved.