forked from github/plane
fix: comment text editor user mention validation addded (#4250)
This commit is contained in:
parent
ac3def2929
commit
51ade1295c
@ -34,10 +34,9 @@ export const LiteTextEditor = React.forwardRef<EditorRefApi, LiteTextEditorWrapp
|
||||
return !!ref && typeof ref === "object" && "current" in ref;
|
||||
}
|
||||
const isEmpty =
|
||||
props.initialValue === "" ||
|
||||
props.initialValue?.trim() === "" ||
|
||||
props.initialValue === "<p></p>" ||
|
||||
isEmptyHtmlString(props.initialValue ?? "");
|
||||
(isEmptyHtmlString(props.initialValue ?? "") && !props.initialValue?.includes("mention-component"));
|
||||
|
||||
return (
|
||||
<div className="border border-custom-border-200 rounded p-3 space-y-3">
|
||||
|
@ -59,10 +59,9 @@ export const LiteTextEditor = React.forwardRef<EditorRefApi, LiteTextEditorWrapp
|
||||
});
|
||||
|
||||
const isEmpty =
|
||||
props.initialValue === "" ||
|
||||
props.initialValue?.trim() === "" ||
|
||||
props.initialValue === "<p></p>" ||
|
||||
isEmptyHtmlString(props.initialValue ?? "");
|
||||
(isEmptyHtmlString(props.initialValue ?? "") && !props.initialValue?.includes("mention-component"));
|
||||
|
||||
function isMutableRefObject<T>(ref: React.ForwardedRef<T>): ref is React.MutableRefObject<T | null> {
|
||||
return !!ref && typeof ref === "object" && "current" in ref;
|
||||
|
Loading…
Reference in New Issue
Block a user