Skip to content

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

@delucas

Description

@delucas

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions