diff --git a/apps/app/components/command-palette/command-pallette.tsx b/apps/app/components/command-palette/command-pallette.tsx index 2a8a4aa4d..0d5b37ada 100644 --- a/apps/app/components/command-palette/command-pallette.tsx +++ b/apps/app/components/command-palette/command-pallette.tsx @@ -82,7 +82,7 @@ export const CommandPalette: React.FC = () => { !(e.target instanceof HTMLTextAreaElement) && !(e.target instanceof HTMLInputElement) && // !(e.target as Element).classList?.contains("remirror-editor") && - !(e.target as Element).closest(".tiptap-editor-container") + !(e.target as Element)?.closest(".tiptap-editor-container") ) { if ((ctrlKey || metaKey) && keyPressed === "k") { e.preventDefault(); diff --git a/apps/app/components/issues/description-form.tsx b/apps/app/components/issues/description-form.tsx index 4353036b3..d190a4092 100644 --- a/apps/app/components/issues/description-form.tsx +++ b/apps/app/components/issues/description-form.tsx @@ -111,7 +111,7 @@ export const IssueDescriptionForm: FC = ({ {errors.name ? errors.name.message : null}
{ if (!value && !watch("description_html")) return <>; @@ -125,8 +125,9 @@ export const IssueDescriptionForm: FC = ({ } setIsSubmitting={setIsSubmitting} onChange={(description: Object, description_html: string) => { - onChange(description); - setValue("description_html", description_html); + onChange(description_html); + // setValue("description_html", description_html); + setValue("description", description); handleSubmit(handleDescriptionFormSubmit)().finally(() => setIsSubmitting(false)); }} /> diff --git a/apps/app/components/issues/extensions.tsx b/apps/app/components/issues/extensions.tsx index 15e59a1c5..403495fa4 100644 --- a/apps/app/components/issues/extensions.tsx +++ b/apps/app/components/issues/extensions.tsx @@ -104,7 +104,7 @@ export const TiptapExtensions = [ return `Heading ${node.attrs.level}`; } - return "Press '/' for commands, or 'Ctrl + Space' for AI autocomplete..."; + return "Press '/' for commands..."; }, includeChildren: true, }), @@ -127,7 +127,7 @@ export const TiptapExtensions = [ nested: true, }), Markdown.configure({ - html: false, + html: true, transformCopiedText: true, }), ]; diff --git a/apps/app/components/issues/tiptap.tsx b/apps/app/components/issues/tiptap.tsx index 8909e4de1..67380a742 100644 --- a/apps/app/components/issues/tiptap.tsx +++ b/apps/app/components/issues/tiptap.tsx @@ -1,4 +1,5 @@ -import { useEditor, EditorContent } from '@tiptap/react'; +import { useEditor, EditorContent, generateText } from '@tiptap/react'; +import StarterKit from '@tiptap/starter-kit'; import { useDebouncedCallback } from 'use-debounce'; import { EditorBubbleMenu } from './EditorBubbleMenu'; import { TiptapExtensions } from './extensions'; @@ -10,7 +11,7 @@ type TiptapProps = { borderOnFocus?: boolean; customClassName?: string; onChange?: (json: any, html: string) => void; - setIsSubmitting?: (isSubmitting: boolean) => void; + setIsSubmitting: (isSubmitting: boolean) => void; } const Tiptap = ({ onChange, setIsSubmitting, value, noBorder, borderOnFocus, customClassName }: TiptapProps) => { @@ -45,7 +46,9 @@ const Tiptap = ({ onChange, setIsSubmitting, value, noBorder, borderOnFocus, cus className={`tiptap-editor-container relative min-h-[150px] ${editorClassNames}`} > {editor && } - +
+ +
); };