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

Namespaced input id is not used on trix-editor input reference #19

Open
delucas opened this issue Apr 15, 2020 · 0 comments
Open

Namespaced input id is not used on trix-editor input reference #19

delucas opened this issue Apr 15, 2020 · 0 comments

Comments

@delucas
Copy link

delucas commented Apr 15, 2020

Describe the bug
Namespaced input id is not taken into account when generating editor, thus no content is displayed into trix editor.

To Reproduce

    <%= simple_form_for entity, url: some_path(entity), namespace: 'some' do |f| %>
      <%= f.input :rich_text_field, as: :trix_editor %>
    <% end %>

Expected behavior
Input gets namespaced id some_rich_text_field. Trix editor has input value some_rich_text_field also. It populates the right value for the text field.

Actual behavior
Input gets namespaced id some_rich_text_field. Trix editor has input value rich_text_field and doesn't populate the field.

Screenshots or Video
N/A

Environment (please complete the following information):

  • Rails version: 5.2.4
  • trix-rails version: 2.2.0
  • Browser: Version 80.0.3987.162 (Official Build) (64-bit)
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