We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<%= kindeditor_tag “content”, :afterUpload => ... %> 现在我有一个 javascript 的上传回调函数,请问怎么传入这个 afterUpload 参数里面呢?
The text was updated successfully, but these errors were encountered:
def kindeditor_tag(name, content = nil, options = {}) id = sanitize_to_id(name) input_html = { :id => id }.merge(options.delete(:input_html) || {}) input_html[:class] = "#{input_html[:class]} rails_kindeditor" output = ActiveSupport::SafeBuffer.new output << text_area_tag(name, content, input_html) output << javascript_tag(js_replace(id, options)) end
这个是源代码,应该直接按你的方法传入,不行你可以通过chrome查看生成后的代码来调试。
Sorry, something went wrong.
@Macrow 您说的直接传入我一开始就试过了哈,直接传入函数名到 options 里面页面会报错,源码里面看了貌似是没对这个字段作支持,后来我放弃了 erb 模板方式,改用 K.create('#textarea_id_name', {afterUpload: function(url){}}) 方式来实现的,谢谢~
No branches or pull requests
<%= kindeditor_tag “content”, :afterUpload => ... %>
现在我有一个 javascript 的上传回调函数,请问怎么传入这个 afterUpload 参数里面呢?
The text was updated successfully, but these errors were encountered: