fix the richTextEditor output in case on no data save (#19476)

* fix the richTextEditor output in case on no data save

* revert the undefined to empty string as we previously had

(cherry picked from commit 06759c589da7b859e10ab31ab0d6cbd838b0069a)
This commit is contained in:
Ashish Gupta 2025-01-22 19:05:54 +05:30
parent 4c8a268688
commit ff9f9063d7

View File

@ -47,7 +47,7 @@ const RichTextEditor = forwardRef<EditorContentRef, RichTextEditorProp>(
const htmlContent = editorRef.current?.editor?.getHTML() ?? '';
const backendFormat = formatContent(htmlContent, 'server');
return backendFormat;
return backendFormat === '<p></p>' ? '' : backendFormat;
},
}));