We're trying to build a markdown editing field and when we add a heading using # the text area appears empty after saving then going back to edit it.
We've noticed that there is no explicit documentation for text areas (ie input :field_name, type: :text). Is this supported?
Everything else seems to work just fine, we get a textarea and can pass through a rows attribute but editing is empty when there is a hash at the start of the first line.
Note that the hash does not cause this issue if there is anything other than whitespace before it.
Reproduction Steps
- Create a field with type text like so:
input :field_name, type: :text
- Add some content to the field with a hash on the first line like:
# Content that will disappear
- Save the model
- Edit the model and notice that the
textarea is now empty
/cc @joshprice
We're trying to build a markdown editing field and when we add a heading using
#the text area appears empty after saving then going back to edit it.We've noticed that there is no explicit documentation for text areas (ie
input :field_name, type: :text). Is this supported?Everything else seems to work just fine, we get a textarea and can pass through a
rowsattribute but editing is empty when there is a hash at the start of the first line.Note that the hash does not cause this issue if there is anything other than whitespace before it.
Reproduction Steps
textareais now empty/cc @joshprice