Ask coding questions

← Back to all posts
How to stop HTML from working on chat?
TheH4ck3r

On OrbitChat, a chat that I've been working on with @Xenity. You can see the code here. Now, the issue that I'm having is that if i type in html, it works.

And yes, I'm planning to get rid of the "undefined" text, ignore that for now.

So, how would I replace the actual HTML with just the text of the code? All answers are appreciated.

Voters
Xenity
TheH4ck3r
Comments
hotnewtop
Coder100

use .innerText instead, so like:

or textContent

TheH4ck3r

@Coder100 so, I'm not so good at JavaScript, but I know a little. I want it so that their not modified when the're typing, but when they click send.

Xenity

@Coder100 i think what @A1PHA1 means is a way to use the tags, without using the tags. Such as Markdown tags, or shortcuts (ctrl + B, i, etc.)