mirror of
https://github.com/docmost/docmost.git
synced 2025-11-19 09:41:11 +10:00
fix editor file handling
This commit is contained in:
@ -28,8 +28,6 @@ declare module "@tiptap/core" {
|
||||
}
|
||||
}
|
||||
|
||||
const VIDEO_INPUT_REGEX = /!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/;
|
||||
|
||||
export const TiptapVideo = Node.create<VideoOptions>({
|
||||
name: "video",
|
||||
|
||||
@ -123,23 +121,10 @@ export const TiptapVideo = Node.create<VideoOptions>({
|
||||
return ReactNodeViewRenderer(this.options.view);
|
||||
},
|
||||
|
||||
addInputRules() {
|
||||
return [
|
||||
nodeInputRule({
|
||||
find: VIDEO_INPUT_REGEX,
|
||||
type: this.type,
|
||||
getAttributes: (match) => {
|
||||
const [, , src] = match;
|
||||
return { src };
|
||||
},
|
||||
}),
|
||||
];
|
||||
},
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
return [
|
||||
VideoUploadPlugin({
|
||||
placeHolderClass: "video-upload",
|
||||
placeholderClass: "video-upload",
|
||||
}),
|
||||
];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user