mirror of
https://github.com/docmost/docmost.git
synced 2026-05-17 06:44:05 +08:00
fix:remove name
This commit is contained in:
@@ -9,7 +9,6 @@ export interface TransclusionSourceOptions {
|
||||
|
||||
export interface TransclusionSourceAttributes {
|
||||
id?: string | null;
|
||||
name?: string | null;
|
||||
}
|
||||
|
||||
declare module "@tiptap/core" {
|
||||
@@ -18,7 +17,6 @@ declare module "@tiptap/core" {
|
||||
insertTransclusionSource: (
|
||||
attributes?: TransclusionSourceAttributes,
|
||||
) => ReturnType;
|
||||
setTransclusionSourceName: (name: string | null) => ReturnType;
|
||||
toggleTransclusionSource: () => ReturnType;
|
||||
unsyncTransclusionSource: () => ReturnType;
|
||||
};
|
||||
@@ -48,12 +46,6 @@ export const TransclusionSource = Node.create<TransclusionSourceOptions>({
|
||||
renderHTML: (attrs) =>
|
||||
attrs.id ? { "data-id": attrs.id } : {},
|
||||
},
|
||||
name: {
|
||||
default: null,
|
||||
parseHTML: (el) => el.getAttribute("data-name"),
|
||||
renderHTML: (attrs) =>
|
||||
attrs.name ? { "data-name": attrs.name } : {},
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
@@ -104,10 +96,6 @@ export const TransclusionSource = Node.create<TransclusionSourceOptions>({
|
||||
|
||||
return commands.insertContent(node);
|
||||
},
|
||||
setTransclusionSourceName:
|
||||
(name) =>
|
||||
({ commands }) =>
|
||||
commands.updateAttributes(this.name, { name }),
|
||||
toggleTransclusionSource:
|
||||
() =>
|
||||
({ commands }) =>
|
||||
|
||||
Reference in New Issue
Block a user