问题描述
我从他们网站的 Online Builder 功能生成了 CKEditor 5 版本 29 的自定义构建,并将其放置在我的 Web 服务器上的根目录中。但是每次我尝试使用编辑器加载页面时,我都会收到此错误(检查浏览器中的元素)。
"...ReferenceError: Can't find variable: Classic Editor ...'
我以前这样做过,通常可以正常工作。我已经重复下载和安装,但每次都出现相同的错误。
这可能是 build 29 的问题,还是我的代码中有一些奇怪的字符出错了(附件)。到现在已经看了很多次了 - 有点疯狂。
<!DOCTYPE html>
<!--HAS_WEBDNA_TAGS-->
<html lang="en">
<head>
<Meta charset="utf-8">
<title>CKEditor 5 – Classic editor</title>
<!-- <script src="https://cdn.ckeditor.com/ckeditor5/29.0.0/classic/ckeditor.js"></script> -->
<script src="/ckeditor5/build/ckeditor.js"></script>
</head>
<body>
<div id="editor">abc</div>
<textarea class="editor">xyz</textarea>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ),{
toolbar: {
items: [
'heading','|','bold','italic','underline','strikethrough','blockQuote','fontfamily','fontsize','fontColor','alignment','bulletedList','numberedList','indent','outdent','-','link','imageUpload','insertTable','removeFormat','code','codeBlock','undo','redo',],shouldNotGroupWhenFull: true
},} )
.catch( error => {
console.error( error );
} );
</script>
</body>
</html>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)