[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:
parent
77b323f562
commit
abce0ed946
14 changed files with 102 additions and 80 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue