javascript - Froala Editor 2 basic init 未捕获类型错误 : undefined is not a function

标签 javascript jquery froala

我只是遵循 froala 文档并使用 metronic 将其与当前布局混合。

这是我的 CSS 订单。

<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<link href="assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/global/css/components-md.css" id="style_components" rel="stylesheet" type="text/css"/>
<link href="assets/global/css/plugins-md.css" rel="stylesheet" type="text/css"/>
<link href="assets/admin/layout2/css/layout.css" rel="stylesheet" type="text/css"/>
<link href="assets/admin/layout2/css/themes/grey.css" rel="stylesheet" type="text/css" id="style_color"/>
<link href="assets/admin/layout2/css/custom.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="assets/coeg-editor/css/froala_editor.min.css" />
<link rel="stylesheet" type="text/css" href="assets/coeg-editor/css/froala_style.min.css" />

这是我的 JS 订单

<script src="assets/global/plugins/jquery.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/global/scripts/metronic.js" type="text/javascript"></script>
<script src="assets/admin/layout2/scripts/layout.js" type="text/javascript"></script>
<script type="text/javascript" src="assets/coeg-editor/js/froala_editor.min.js"></script>
<script>
$(function() {
   Metronic.init(); // init metronic core componets
   Layout.init(); // init layout
   $('a[href="{{ Request::url() }}"]').parent().addClass('active');
   $('textarea#content').editable({inlineMode: false});
});
</script>

我在 $('textarea#content').editable({inlineMode: false});< 处得到 Uncaught TypeError: undefined is not a function/p>

但是如果我注释 $('textarea#content').editable({inlineMode: false}); 部分,则不会出现错误。

我该如何解决它?

最佳答案

参见https://www.froala.com/wysiwyg-editor/v2.0/docs/migrate-from-v1用于使用 froalaEditor() 代替 可编辑()

不要介意包含示例的 html 仍然使用 v1 语法而不是 v2 :D

关于javascript - Froala Editor 2 basic init 未捕获类型错误 : undefined is not a function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32929971/

相关文章:

javascript - Froala Font-Size Popup 方向错误

javascript - 将值传递给模态的最佳方法是什么?

javascript - 在 Firefox 上,异步回调在 DOMContentLoaded 之前运行

javascript - 解析分组的json

javascript - PushState() 关闭 'remember password' 对话框

javascript - 如何更改其他事件包含的事件中元素的值?

javascript - jQuery AJAX 响应 JSON 获取子节点

javascript - 有没有办法在图片到图片模式下打开 HTML 卡(用于 PC)

javascript - froala 没有显示一些工具栏按钮

html - 包含较小字体的跨度的段落的行高不正确