有人成功用过 Meteor 的 Summernote 编辑器吗?
见http://hackerwins.github.io/summernote/
我在模板中包含了以下 div:
<div id="summernote">Hello Summernote</div>
我像这样实例化:
Template.sometemplate.rendered = function(){
$('#summernote').summernote({
height: 200, //set editable area's height
focus: true //set focus editable area after Initialize summernote
});
}
控制台中的错误消息:
Resource interpreted as Script but transferred with MIME type text/html:
"http://localhost:3000/summernote.min.js". newcontentlayout:138
Uncaught SyntaxError: Unexpected token < summernote.min.js:1
Exception from Deps afterFlush function function: TypeError: undefined is not a function
at Object.Template.contentLayoutNew.rendered (http://localhost:3000/client/views/contentlayouts/contentlayout_new.js?cb9b5cd577322a6aec6c2ac6819121e7f43b8dc2:6:22)
at http://localhost:3000/packages/ui.js?f0696b7e9407b8f11e5838e7e7820e9b6d7fc92f:426:23
at _assign.flush (http://localhost:3000/packages/deps.js?91f1235baecd83915f7d3a7328526dbba41482be:345:13) debug.js:41
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
任何想法赞赏?