I have a ‘preview’ written in JQuery, which when I write in a textarea, it is written in HTML so that I can see what the output will look like before submitting a post.
One problem though, is that while the main behaviour I want is for the preview to be written in HTML (so that i can see images in real-time), I need to configure it so any text written in the textarea, within <‘code’> tags, should be written as text, instead of HTML.
Can this be done?
Thanks in advance guys!
To give an example:
This is text, displayed as text. The following image is nice: <img src="" />
Below is the code to display this image:
<code><img src="" /></code>
Once you create the preview, you could just run this to replace the HTML inside of the
codetags with text, like this: