我只想froala
在我的网站上使用文本编辑器,但是却收到Uncaught TypeError:$(...)。froalaEditor不是一个函数。
我用它搜索了一下,并在这里找到了解决方案,但我不知道如何使用此源。主要是因为我的代码中没有任何地方
var $ = require('jquery');
require('node_modules/froala-editor/js/froala_editor.min.js');
$(function() {
var $target = $('<div>').appendTo('body');
$target.froalaEditor()
});
我只是遵循了文档https://github.com/froala/wysiwyg-editor。我在顶部使用了{{form.media}},但在控制台上却遇到了上述错误。有人可以告诉我如何在github中使用该解决方案吗?
require('node_modules / froala-editor / js / froala_editor.min.js')($) ;
你最后看到了吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句