Created
August 8, 2019 00:48
-
-
Save frankolson/4f7794c008ad39d0b0b2f29392dcbbc3 to your computer and use it in GitHub Desktop.
Trix Editor view example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_with model: @article do |form| %> | |
<div class="field"> | |
<%= form.label :title %> | |
<%= form.text_field :title, placeholder: 'Title' %> | |
</div> | |
<div class="field"> | |
<input id="article_content" type="hidden" name="article[content]" | |
value="<%= form.content %>"> | |
<trix-editor input="article_content"></trix-editor> | |
</div> | |
<%= form.submit %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment