mirror of
https://github.com/docmost/docmost.git
synced 2026-05-17 23:14:07 +08:00
feat: synced blocks (transclusion)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user