From c52ad68d92c2aa23af05947b449a93ad5da1953f Mon Sep 17 00:00:00 2001 From: sbwalker Date: Fri, 5 Apr 2024 16:07:01 -0400 Subject: [PATCH] fix #4108 - content lost when adding image to RichTextEditor --- Oqtane.Client/Modules/Controls/RichTextEditor.razor | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/RichTextEditor.razor b/Oqtane.Client/Modules/Controls/RichTextEditor.razor index e59cc893..40fe4801 100644 --- a/Oqtane.Client/Modules/Controls/RichTextEditor.razor +++ b/Oqtane.Client/Modules/Controls/RichTextEditor.razor @@ -157,12 +157,6 @@ _rawhtml = Content; _originalrawhtml = _rawhtml; // preserve for comparison later _originalrichhtml = ""; - - // Quill wraps content in

tags which can be used as a signal to set the active tab - if (!AllowRichText || (AllowRawHtml && !string.IsNullOrEmpty(Content) && !Content.StartsWith("

"))) - { - _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)) {