0

我已经在我的 laravel 5.6 项目(npm install --save @ckeditor/ckeditor5-build-classic)中使用 npm 安装了 ckeditor5,然后我添加window.ckeditor = require('@ckeditor/ckeditor5-build-classic'); 到我的resources/assets/js/app.js并运行npm run dev。编译成功。在我看来,当我尝试引用时ckeditor,它说它找不到 ckeditor。请帮忙

这是我的resources/assets/js/app.js

require('./bootstrap');

window.Vue = require('vue');

/* tried both of these options one by one*/
window.ckeditor = require('@ckeditor/ckeditor5-build-classic');
// import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
4

2 回答 2

0

尝试使用以下内容:

const ClassicEditor = require( '@ckeditor/ckeditor5-build-classic' );
于 2018-11-02T06:04:07.103 回答
0

尝试import ClassicEditor from "@ckeditor/ckeditor5-build-classic";

安装说明

于 2018-05-02T05:44:57.390 回答