我正在尝试将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)
您需要先将CKFinder附加到您的页面,因此CKEditor 5可以使用它。
最简单的方法是使用脚本标记:
<script src="https://example.com/ckfinder/ckfinder.js"></script>