Move Link extension before Markdown in the TipTap extensions array to ensure URL detection happens before markdown processing. Also explicitly enable linkOnPaste for paste detection. Fixes #376 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -463,13 +463,6 @@ export default function Editor({
|
|||||||
StarterKit.configure({
|
StarterKit.configure({
|
||||||
heading: disableHeadings ? false : undefined,
|
heading: disableHeadings ? false : undefined,
|
||||||
}),
|
}),
|
||||||
Markdown,
|
|
||||||
Placeholder.configure({
|
|
||||||
placeholder: readOnly
|
|
||||||
? ""
|
|
||||||
: placeholder ??
|
|
||||||
t`Add description... (type '/' to open commands or '@' to mention)`,
|
|
||||||
}),
|
|
||||||
Link.configure({
|
Link.configure({
|
||||||
openOnClick: true,
|
openOnClick: true,
|
||||||
HTMLAttributes: {
|
HTMLAttributes: {
|
||||||
@@ -479,6 +472,14 @@ export default function Editor({
|
|||||||
},
|
},
|
||||||
validate: (href) => /^https?:\/\//.test(href),
|
validate: (href) => /^https?:\/\//.test(href),
|
||||||
autolink: true,
|
autolink: true,
|
||||||
|
linkOnPaste: true,
|
||||||
|
}),
|
||||||
|
Markdown,
|
||||||
|
Placeholder.configure({
|
||||||
|
placeholder: readOnly
|
||||||
|
? ""
|
||||||
|
: placeholder ??
|
||||||
|
t`Add description... (type '/' to open commands or '@' to mention)`,
|
||||||
}),
|
}),
|
||||||
SlashCommands.configure({
|
SlashCommands.configure({
|
||||||
commandItems: getCommandItems(disableHeadings),
|
commandItems: getCommandItems(disableHeadings),
|
||||||
|
|||||||
Reference in New Issue
Block a user