gpt4 book ai didi

Meteor:有没有人成功使用过Summernote 编辑器?

转载 作者:行者123 更新时间:2023-12-04 18:42:06 29 4
gpt4 key购买 nike

有没有人成功地将 Summernote 编辑器与 Meteor 一起使用?

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.

任何想法赞赏?

最佳答案

我证明了编辑器并且完美运行。我将代码编辑器放在文件夹 Client 中,因为它适用于对象窗口。之后,您的代码可能是以下方式。
.html

<template name="editor">
<div id="summernote">Hello Summernote</div>
</template>
.js在文件夹客户端
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

关于Meteor:有没有人成功使用过Summernote 编辑器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23752145/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com