Rails 3. simple_format do not wrap result in paragraph tags

前端 未结 3 1234
忘了有多久
忘了有多久 2020-12-20 12:28

How can I make simple_format not wrap the returned value in p tags?

simple_format \"*\"

3条回答
  •  温柔的废话
    2020-12-20 13:22

    You can specify wrapper_tag option.

    simple_format 'Hello', {}, wrapper_tag: 'span'
    

    This code will be:

    Hello
    

提交回复
热议问题