Skip to content
New issue

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

id not work for kindeditor_tag #101

Open
dreamable opened this issue Aug 10, 2018 · 0 comments
Open

id not work for kindeditor_tag #101

dreamable opened this issue Aug 10, 2018 · 0 comments

Comments

@dreamable
Copy link

If we want to specify id instead of the default one from name, it won't work on the js part.
For example
<%= kindeditor_tag "name", value, input_html: {id: "my_id"} %>
In the generate html, the id for text_area is "my_id", but the js, it still use the default id "#name".

The fix should be in the rails_kindeditor/lib/rails_kindeditor/helper.rb file, change line 9 to
output << javascript_tag(js_replace(input_html[:id], options))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant