One dilemma I'm facing involves a textarea element on my website where users input HTML code. My goal is to showcase this entered HTML code in a different section of the webpage. How should I approach this challenge?
The desired outcome is similar to how Stack Overflow handles HTML tags in their question text area - if a user types "this", it displays as **this** on the page. Another scenario is when a user inputs an image tag, and I would like that image to appear elsewhere on the site.
In my tech stack, I am leveraging Node and Express for the backend, using MongoDB to store user input, and incorporating ejs templates for rendering the HTML content.