mirror of
https://github.com/makeplane/plane.git
synced 2025-12-23 07:09:34 +01:00
[WEB-735] chore: added a custom placeholder prop to all the editors (#4194)
* chore: added a custom placeholder prop to all the editors * chore: inbox issue create modal placeholder
This commit is contained in:
committed by
GitHub
parent
77b323f562
commit
abce0ed946
@@ -19,6 +19,7 @@ export type IssueDescriptionInputProps = {
|
||||
initialValue: string | undefined;
|
||||
disabled?: boolean;
|
||||
issueOperations: TIssueOperations;
|
||||
placeholder?: string | ((isFocused: boolean) => string);
|
||||
setIsSubmitting: (initialValue: "submitting" | "submitted" | "saved") => void;
|
||||
swrIssueDescription: string | null | undefined;
|
||||
};
|
||||
@@ -33,6 +34,7 @@ export const IssueDescriptionInput: FC<IssueDescriptionInputProps> = observer((p
|
||||
initialValue,
|
||||
issueOperations,
|
||||
setIsSubmitting,
|
||||
placeholder,
|
||||
} = props;
|
||||
|
||||
const { handleSubmit, reset, control } = useForm<TIssue>({
|
||||
@@ -103,6 +105,14 @@ export const IssueDescriptionInput: FC<IssueDescriptionInputProps> = observer((p
|
||||
onChange(description_html);
|
||||
debouncedFormSave();
|
||||
}}
|
||||
placeholder={
|
||||
placeholder
|
||||
? placeholder
|
||||
: (isFocused) => {
|
||||
if (isFocused) return "Press '/' for commands...";
|
||||
else return "Click to add description";
|
||||
}
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<RichTextReadOnlyEditor
|
||||
|
||||
Reference in New Issue
Block a user