Rails — Add a line break into a text area

前端 未结 11 990
南旧
南旧 2020-12-12 10:21

I got a rails app where I can input a few paragraphs of text into my model. The problem is I dont know how to input any line breaks.

I\'ve tried to add \" {ln}{/ln}

11条回答
  •  抹茶落季
    2020-12-12 11:06

    See here http://code.byteblues.com/2012/03/23/preloading-a-text-input-area-text_area-with-data-that-contains-a-line-break/

    <%=raw text_area_tag :keywords, keywords, :rows => 8 %>
    

提交回复
热议问题