Merge pull request #4111 from sbwalker/dev

fix #4108 - content lost when adding image to RichTextEditor
This commit is contained in:
Shaun Walker 2024-04-05 16:07:15 -04:00 committed by GitHub
commit 07f367a2a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -157,12 +157,6 @@
_rawhtml = Content;
_originalrawhtml = _rawhtml; // preserve for comparison later
_originalrichhtml = "";
// Quill wraps content in <p> tags which can be used as a signal to set the active tab
if (!AllowRichText || (AllowRawHtml && !string.IsNullOrEmpty(Content) && !Content.StartsWith("<p>")))
{
_activetab = "Raw";
}
}
protected override async Task OnAfterRenderAsync(bool firstRender)
@ -184,7 +178,10 @@
DebugLevel);
}
await interop.LoadEditorContent(_editorElement, _richhtml);
if (!_richfilemanager)
{
await interop.LoadEditorContent(_editorElement, _richhtml);
}
if (string.IsNullOrEmpty(_originalrichhtml))
{