Skip to content

Add rich_text_area#193

Merged
kalashnikovisme merged 6 commits into
mainfrom
rich_text_area
Jun 5, 2026
Merged

Add rich_text_area#193
kalashnikovisme merged 6 commits into
mainfrom
rich_text_area

Conversation

@kalashnikovisme

Copy link
Copy Markdown
Member

What's changed basically?

Added Tramway support for Action Text rich text fields.

  • Tramway::Form::Builder#rich_text_area
  • Tramway::Form::Builder#rich_textarea
  • tramway_field :rich_text_area
  • Dark Tailwind/Trix editor and toolbar styling
  • Form titles on edit pages now use the record title when available
  • README docs were updated with the new helper

What's changed for tramway drivers?

Tramway forms can now render Action Text/Trix editors with Tramway form styling.

Before

class PostForm < Tramway::BaseForm
  fields :title, :text
end

<%= f.text_area :text %>

After

  class PostForm < Tramway::BaseForm
    fields :title, :rich_text_area
  end

  <%= f.rich_text_area :bio %>

rich_text_area keeps custom classes/data attributes and marks the editor so Tramway
JavaScript can style the Trix toolbar consistently with the dark form UI.

Docs updated in README:
https://github.com/Purple-Magic/tramway/blob/rich_text_area/README.md#tramway_form_for

@kalashnikovisme kalashnikovisme merged commit 66c6692 into main Jun 5, 2026
48 of 50 checks passed
@kalashnikovisme kalashnikovisme deleted the rich_text_area branch June 5, 2026 22:08
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

Successfully merging this pull request may close these issues.

1 participant