feat: synced blocks (transclusion)

This commit is contained in:
Philipinho
2026-05-07 22:20:29 +01:00
parent 17f3158a3b
commit 94ecc98617
60 changed files with 4556 additions and 96 deletions
@@ -0,0 +1,13 @@
const ATTACHMENT_NODE_TYPES = [
'attachment',
'image',
'video',
'audio',
'pdf',
'excalidraw',
'drawio',
];
export function isAttachmentNode(nodeType: string): boolean {
return ATTACHMENT_NODE_TYPES.includes(nodeType);
}
@@ -1,2 +1,2 @@
export * from './generateHTML.js';
export * from './generateJSON.js';
export * from './generateHTML';
export * from './generateJSON';
@@ -11,6 +11,7 @@ import {
INTERNAL_LINK_REGEX,
extractPageSlugId,
} from '../../../integrations/export/utils';
import { isAttachmentNode } from './attachment-node-types';
export interface MentionNode {
id: string;
@@ -122,18 +123,7 @@ export function getProsemirrorContent(content: any) {
);
}
export function isAttachmentNode(nodeType: string) {
const attachmentNodeTypes = [
'attachment',
'image',
'video',
'audio',
'pdf',
'excalidraw',
'drawio',
];
return attachmentNodeTypes.includes(nodeType);
}
export { isAttachmentNode };
export function getAttachmentIds(prosemirrorJson: any) {
const doc = jsonToNode(prosemirrorJson);