I localized the problem, but it's kind of a horror. )))
How is this even understood?
let editor_middle;
.create(document.querySelector('editor_middle'))
.then(editor => {
//const toolbarContainer = document.querySelector('#toolbar-container');
//toolbarContainer.appendChild(editor.ui.view.toolbar.element);
editor.enableReadOnlyMode('feature-id');
editor_middle = editor;
})
.catch(error => {
console.error(error);
});
</script>
Everything works if I insert the data manually into the <div> (what I have in the database).
<div id="editor_middle" style="background: White;">
<p> </p><p><span class="text-big" style="color:hsl(0,100%,38%);"><strong>Handheld emperor</strong></span></p><p> </p><p>Handheld emperor</p><p>Nintendo, a Japanese electronics company, started as a <a href="https://en.wikipedia.org/wiki/Hanafuda"><i>hanafuda</i> cards</a> manufacturer in 1889. In the mid-1970s, they entered the early video games market and became famous for their home video and handheld game consoles. Nintendo introduced consoles like <strong>NES</strong>, <strong>SNES</strong>, and <strong>Wii</strong>. But the most revolutionary was for sure the <strong>Game Boy</strong>.</p><p>A countdown of Nintendo handhelds</p><p>
</div>
If I output the same string from the DB from the string property of the model, then I see html.
<div id="editor_middle" style="background: White;">
@Model.ProjectProduct.MiddleDescription_en
</div>
What the hell is this?And how to fix it?
I need to put a line with html from the database in the div.