Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor 流星:有人成功使用过Summernote编辑器吗?_Meteor_Summernote - Fatal编程技术网

Meteor 流星:有人成功使用过Summernote编辑器吗?

Meteor 流星:有人成功使用过Summernote编辑器吗?,meteor,summernote,Meteor,Summernote,有人成功地将Summernote编辑器用于Meteor吗 看 我在模板中包含了以下div: <div id="summernote">Hello Summernote</div> 控制台中的错误消息: Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:3000/summernote.min.js".

有人成功地将Summernote编辑器用于Meteor吗

我在模板中包含了以下div:

      <div id="summernote">Hello Summernote</div>
控制台中的错误消息:

     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. 
资源解释为脚本,但使用MIME类型text/html传输:
"http://localhost:3000/summernote.min.js". newcontentlayout:138
未捕获的语法错误:意外标记

有什么好主意吗?

我证明了编辑的能力,而且工作得非常完美。我将编辑器中的代码放在文件夹客户端中,因为它与对象窗口一起工作。在这之后,您的代码可以采用以下方式

.html

<template name="editor">
  <div id="summernote">Hello Summernote</div>
</template>
编辑的文件

summernote.min.js
summernote.css
summernote-bs2.css
summernote-bs3.css

非常感谢。。在使用Meteor 0.9.2 rc进行移动/潜在重写的过程中,所以一点也不会涉及到这一点。感谢againI创建了一个示例存储库,介绍如何将summernote与meteor一起使用。请随时发送
拉取请求
Template.editor.rendered = function() {
     $('#summernote').summernote({
         height: 200,   // set editable area's height
         focus: true    // set focus editable area after Initialize summernote
     });
}
summernote.min.js
summernote.css
summernote-bs2.css
summernote-bs3.css