[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:
Aaryan Khandelwal 2024-04-15 20:00:02 +05:30 committed by GitHub
parent 77b323f562
commit abce0ed946
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 102 additions and 80 deletions

View file

@ -32,6 +32,7 @@ export interface ILiteTextEditor {
suggestions?: () => Promise<IMentionSuggestion[]>;
};
tabIndex?: number;
placeholder?: string | ((isFocused: boolean) => string);
}
const LiteTextEditor = (props: ILiteTextEditor) => {
@ -46,6 +47,7 @@ const LiteTextEditor = (props: ILiteTextEditor) => {
onEnterKeyPress,
tabIndex,
mentionHandler,
placeholder = "Add comment...",
} = props;
const editor = useEditor({
@ -60,6 +62,7 @@ const LiteTextEditor = (props: ILiteTextEditor) => {
forwardedRef,
extensions: LiteTextEditorExtensions(onEnterKeyPress),
mentionHandler,
placeholder,
});
const editorContainerClassName = getEditorClassNames({