将 Trix 编辑器与简单表格一起使用
Using Trix editor with Simple Form
我正在使用 gem 'trix' 的 Trix 编辑器和 Simple Form。这是我在表格中所做的:
<%= f.input :body, as: :trix_editor %>
我得到 "No input found for trix_editor"。 gem 的文档仅讨论将其与 Formtastic 一起使用。任何帮助将不胜感激。
以下应该有效
<%= f.trix_editor :body %>
我正在使用 gem 'trix' 的 Trix 编辑器和 Simple Form。这是我在表格中所做的:
<%= f.input :body, as: :trix_editor %>
我得到 "No input found for trix_editor"。 gem 的文档仅讨论将其与 Formtastic 一起使用。任何帮助将不胜感激。
以下应该有效
<%= f.trix_editor :body %>