J
J
Juniorrrrr2020-07-26 16:40:08
JavaScript
Juniorrrrr, 2020-07-26 16:40:08

How to import HTML into draftJS?

How to convert html to draft js ?

Tell me there is a custom html structure that can be generated in draftJs by clicking the button on the toolbar. (See example)

The problem arises when I try to feed the same structure to the draft, for some reason it does not understand the same structure that it gives at the time of initialization.

For example, if you click on the custom btn button, the draft will generate a structure at the output

<p class="article_paragraph"><div class="custom_btn">какое-то  значение</div></p>


But at the same time, if you try to specify the same structure as the primary initialization, then the result is not displayed as it should be.

For clarity, I created an example.

Can you tell me what the problem might be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question