react-linkify
react-linkify copied to clipboard
Any chance for multiline support?
i.e. replace \n
s with <br>
s?
The issue seems old but good issue
I have solved this problem. https://stackoverflow.com/questions/36260013/react-display-line-breaks-from-saved-textarea
Using css method
<Linkify
componentDecorator={(decoratedHref, decoratedText, key) => (
<a
target="blank"
rel="noopener noreferrer"
href={decoratedHref}
key={key}
>
{decoratedText}
</a>
)}
>
<div
style={{
whiteSpace: "pre-line",
}}
>
{children}
</div>
</Linkify>
Also I added open in new tab functionality, thanks to https://github.com/tasti/react-linkify/issues/96#issuecomment-628472955