I'm facing an issue where I can successfully save HTML text to DB using the Editor. Still, upon loading the exact text (with all the formatting tags), the Editor refuses to format it correctly and displays it as plain text:
@* Background *@
<div class="row mt-3">
<div class="col-12">
@Html.LabelFor(m => m.BackgroundConcessionaireContract, "Background of Concessionaire/Contract *", new { @class = "col-12 control-label" })
<kendo-editor for="BackgroundConcessionaireContract" style="height:350px" aria-label="editor"
placeholder="Background of Concessionaire/Contract">
<tools>...</tools>
</kendo-editor>
</div>
</div>
<hr class="cm-hr" />
@* Proposal Details *@
<div id="divProposalDetails" class="row mt-3">
<div class="col-12">
@Html.LabelFor(m => m.CommercialTermsDetails, "Commercial Terms Details *", new { @class = "col-12 control-label" })
<kendo-editor for="CommercialTermsDetails" style="height:350px" aria-label="editor"
placeholder="Commercial Terms Details">
<tools>...</tools>
</kendo-editor>
</div>
</div>
<hr class="cm-hr" />
@* Financial Analysis *@
<div class="row mt-3">
<div class="col-12">
@Html.LabelFor(m => m.FinancialAnalysis, "Financial Analysis *", new { @class = "col-12 control-label" })
<kendo-editor for="FinancialAnalysis" style="height: 350px" aria-label="editor"
placeholder="Financial Analysis">
<tools>...</tools>
</kendo-editor>
</div>
</div>
In the model, the fields are defined simply as:
public string BackgroundConcessionaireContract { get; set; }
public string CommercialTermsDetails { get; set; }
public string FinancialAnalysis { get; set; }
The output is like this:
I also noted that If I don't correct the unformatted plain text and save again, the editor saves even more obscured characters and this keeps happening:
A simple
Test
became
<strong>T</strong>est
and then became
&lt;strong&gt;T&lt;/strong&gt;est