我正在尝试几个所见即所得的 HTML5/JQuery 编辑器。但是,对于 Bootstrap WISWYG 和 Summernote,我得到“无法读取未定义的属性 'fn'”或“无法读取未定义的属性“编辑器”。我只是在 GitHub 上使用标准文件。任何人都熟悉使用 JQuery 插件的这些错误?
编辑
我现在正在尝试Bootstrap WISWYG
在我的身体里,我有
<div id="editor">Editor</div>
在我的 js 中,我有
$(document).ready(function() {
$('#editor').wysihtml5();
});
但是,我得到的错误是:无法读取未定义的属性“编辑器”(第 157 行)
第 157 行:
var editor = new wysi.Editor(this.el[0], options);
JSFiddle:http: //jsfiddle.net/MgcDU/8125/
编辑 2
我忘了包含一个 JS 文件。但是,在包含它之后,我收到了一个新错误:
Uncaught TypeError: Cannot read property 'firstChild' of undefined
错误所指的代码行:
if (isString) {
element = wysihtml5.dom.getAsDom(elementOrHtml, context);
} else {
element = elementOrHtml;
}
while (element.firstChild) <<<Error