`How to remove or bypass automatic closing of tags by the browser, any ideas?
A
A
Alexander N2021-06-18 12:07:23
React
Alexander N, 2021-06-18 12:07:23

How to remove or bypass automatic closing of tags by the browser, any ideas?

There is a text
"I`m vasya [], and you?"
In the process of working with it in the editor, it receives tags - " " (there may be font, etc.) Further, [] is replaced by and we get a type code:<b>I`m vasya [], and you?</b>
<span contentEditable />

<b>I`m vasya <span contentEditable />, and you?</b>"


But the browser on the output "rules" all this and we get
<b>I`m vasya</b><span contentEditable />, and you?"


What are the options to fix this? Provided that the text can be long and the tags can be different...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kentavr16, 2021-06-18
@Kentavr16

Make I'm vasja part of the component, in which to pass the necessary values ​​as props.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question