mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
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;
|
return !!ref && typeof ref === "object" && "current" in ref;
|
||||||
}
|
}
|
||||||
const isEmpty =
|
const isEmpty =
|
||||||
props.initialValue === "" ||
|
|
||||||
props.initialValue?.trim() === "" ||
|
props.initialValue?.trim() === "" ||
|
||||||
props.initialValue === "<p></p>" ||
|
props.initialValue === "<p></p>" ||
|
||||||
isEmptyHtmlString(props.initialValue ?? "");
|
(isEmptyHtmlString(props.initialValue ?? "") && !props.initialValue?.includes("mention-component"));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="border border-custom-border-200 rounded p-3 space-y-3">
|
<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 =
|
const isEmpty =
|
||||||
props.initialValue === "" ||
|
|
||||||
props.initialValue?.trim() === "" ||
|
props.initialValue?.trim() === "" ||
|
||||||
props.initialValue === "<p></p>" ||
|
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> {
|
function isMutableRefObject<T>(ref: React.ForwardedRef<T>): ref is React.MutableRefObject<T | null> {
|
||||||
return !!ref && typeof ref === "object" && "current" in ref;
|
return !!ref && typeof ref === "object" && "current" in ref;
|
||||||
|
Loading…
Reference in New Issue
Block a user