[WEB-2233] fix: intake issue comment (#5368)
* fix: intake issue comment * chore: issue comment improvement
This commit is contained in:
parent
4a71eef72e
commit
3e83eed398
9 changed files with 34 additions and 32 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Extension } from "@tiptap/core";
|
||||
|
||||
export const EnterKeyExtension = (onEnterKeyPress?: (descriptionHTML: string) => void) =>
|
||||
export const EnterKeyExtension = (onEnterKeyPress?: () => void) =>
|
||||
Extension.create({
|
||||
name: "enterKey",
|
||||
|
||||
|
|
@ -8,7 +8,9 @@ export const EnterKeyExtension = (onEnterKeyPress?: (descriptionHTML: string) =>
|
|||
return {
|
||||
Enter: () => {
|
||||
if (!this.editor.storage.mentionsOpen) {
|
||||
onEnterKeyPress?.(this.editor.getHTML());
|
||||
if (onEnterKeyPress) {
|
||||
onEnterKeyPress();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export interface IEditorProps {
|
|||
suggestions?: () => Promise<IMentionSuggestion[]>;
|
||||
};
|
||||
onChange?: (json: object, html: string) => void;
|
||||
onEnterKeyPress?: (descriptionHTML: string) => void;
|
||||
onEnterKeyPress?: (e?: any) => void;
|
||||
placeholder?: string | ((isFocused: boolean, value: string) => string);
|
||||
tabIndex?: number;
|
||||
value?: string | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue