Compare commits

...

1 Commits

Author SHA1 Message Date
Tom Moor 0da19596a3 fix: Direct link to heading lost when pasting 2025-03-22 12:49:35 -04:00
+4 -2
View File
@@ -122,6 +122,8 @@ export default class PasteHandler extends Extension {
}
// Is the link a link to a document? If so, we can grab the title and insert it.
const containsHash = text.includes("#");
if (isDocumentUrl(text)) {
const slug = parseDocumentSlug(text);
@@ -133,7 +135,7 @@ export default class PasteHandler extends Extension {
return;
}
if (document) {
if (state.schema.nodes.mention) {
if (state.schema.nodes.mention && !containsHash) {
view.dispatch(
view.state.tr.replaceWith(
state.selection.from,
@@ -178,7 +180,7 @@ export default class PasteHandler extends Extension {
return;
}
if (collection) {
if (state.schema.nodes.mention) {
if (state.schema.nodes.mention && !containsHash) {
view.dispatch(
view.state.tr.replaceWith(
state.selection.from,