Closed reasonpun closed 10 years ago
gem 'rails', '4.1.4'下安装了gem 'rails_kindeditor' 通过如下代码加载kindeditor $(document).on 'page:load', -> if $('#post_description').length > 0 KindEditor.create '#post_description', "width":"100%", "height":300, "allowFileManager":true, "uploadJson":"/kindeditor/upload", "fileManagerJson":"/kindeditor/filemanager", "items":["fontname","fontsize"...... erb代码这么写的:
首次进入页面可以成功加载KindEditor,但是刷新当前页面后不能成功创建KindEditor,请问下这是什么原因呢?非常感谢~
然后我改了下这个语句,貌似刷新页面也可以正常加载了 $(document).on 'ready page:load', ->....... thx~~~
不错!
gem 'rails', '4.1.4'下安装了gem 'rails_kindeditor' 通过如下代码加载kindeditor $(document).on 'page:load', -> if $('#post_description').length > 0 KindEditor.create '#post_description', "width":"100%", "height":300, "allowFileManager":true, "uploadJson":"/kindeditor/upload", "fileManagerJson":"/kindeditor/filemanager", "items":["fontname","fontsize"...... erb代码这么写的:
首次进入页面可以成功加载KindEditor,但是刷新当前页面后不能成功创建KindEditor,请问下这是什么原因呢?非常感谢~