I am using react.js I'm trying to build a blog page. there is a texterea tag to write a blog for the user. now I want to add the function that allows users to add words that are linked. so that when i show the text from that input words that are linked are clickable enter image description here like the blue words in wiki in the image above. pardon my mistakes (1st question in StackOverflow)
I know about dangerouslysetinnerhtml. but not sure if it's the right way to do so. because then users can modify the code inside (i think). so what is the safe and right way to do so
Reading your case Markdown seems best option as it also supports links insertion. For rendering user entered markdown you may use library like React Markdown. For writing markdown textarea
is fine as long as you write markdown syntax properly but you may want to consider libraries like React textarea markdown editor to make things easier.