【发布时间】:2022-12-27 21:14:51
【问题描述】:
How my text appears when rendered How my text appears in the textarea input
I am posting multi-paragraph blogs, some about poetry (where line breaks and spacings matter a lot). How do I make the line breaks and other spacing stay when I render the data? Can I make it so the user can put html tags in the textarea somehow? I am using firebase realtime database to store the data.
I tried changing the HTML tag in the rendered component from p to per, expecting to be able to use html tags, but that didn't work.
【问题讨论】:
标签: reactjs textarea user-input text-rendering