feat: refactor link menu (#2025)

* link markview - WIP

* WIP

* feat: refactor links

* cleanup
This commit is contained in:
Philip Okugbe
2026-03-15 17:08:59 +00:00
committed by GitHub
parent 97c459be67
commit 89b94e5d19
21 changed files with 944 additions and 219 deletions
@@ -291,6 +291,7 @@ export class ExportService {
prosemirrorJson,
slugIdToPath,
currentPagePath,
baseUrl,
);
if (includeAttachments) {
@@ -62,6 +62,7 @@ export function replaceInternalLinks(
prosemirrorJson: any,
slugIdToPath: Record<string, string>,
currentPagePath: string,
baseUrl?: string,
) {
const doc = jsonToNode(prosemirrorJson);
@@ -76,6 +77,10 @@ export function replaceInternalLinks(
const localPath = slugIdToPath[slugId];
if (!localPath) {
if (baseUrl && mark.attrs.href.startsWith('/')) {
//@ts-expect-error
mark.attrs.href = `${baseUrl}${mark.attrs.href}`;
}
continue;
}