Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Trix Editor view example
<%= form_with model: @article do |form| %>
<div class="field">
<%= form.label :title %>
<%= form.text_field :title, placeholder: 'Title' %>
<div class="field">
<input id="article_content" type="hidden" name="article[content]"
value="<%= form.content %>">
<trix-editor input="article_content"></trix-editor>
<%= form.submit %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.