CKEditor 4.7x - Uncaught SyntaxError: Invalid shorthand property initializer
CKEditor 4.7x - Uncaught SyntaxError: Invalid shorthand property initializer
我试图让图像上传器与 CKeditor 一起工作,但我收到以下错误:
Uncaught SyntaxError: Invalid shorthand property initializer load_ckeditor.js
内容如下of_ckeditor.js
CKEDITOR.plugins.addExternal(
'imageuploader',
'/themes/blog/imageuploader/',
'plugin.js'
);
CKEDITOR.replace( 'editor1',{
extraPlugins = 'imageuploader'
});
错误行号是指这个:
extraPlugins = 'imageuploader'
我已经按照此处的示例完全复制了代码:https://cdn.ckeditor.com/
当我删除 extraPlugins = 'imageuploader' 时,CKEditor 正确加载但缺少插件。
您的语法有误,CKEDITOR.replace
需要一个对象,所以它需要一个冒号而不是等号。正确的实现应该是:
CKEDITOR.replace( 'editor1',{
extraPlugins: 'imageuploader'
});
我试图让图像上传器与 CKeditor 一起工作,但我收到以下错误:
Uncaught SyntaxError: Invalid shorthand property initializer load_ckeditor.js
内容如下of_ckeditor.js
CKEDITOR.plugins.addExternal(
'imageuploader',
'/themes/blog/imageuploader/',
'plugin.js'
);
CKEDITOR.replace( 'editor1',{
extraPlugins = 'imageuploader'
});
错误行号是指这个:
extraPlugins = 'imageuploader'
我已经按照此处的示例完全复制了代码:https://cdn.ckeditor.com/
当我删除 extraPlugins = 'imageuploader' 时,CKEditor 正确加载但缺少插件。
您的语法有误,CKEDITOR.replace
需要一个对象,所以它需要一个冒号而不是等号。正确的实现应该是:
CKEDITOR.replace( 'editor1',{
extraPlugins: 'imageuploader'
});