rename VueRenderer to VueNodeViewRenderer

This commit is contained in:
Philipp Kühn 2021-01-18 12:40:05 +01:00
parent 9f0ae94201
commit 06b88977fc
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ function getComponentFromElement(element: HTMLElement): Vue {
return element.__vue__
}
interface VueRendererOptions {
interface VueNodeViewRendererOptions {
stopEvent: ((event: Event) => boolean) | null,
update: ((node: ProseMirrorNode, decorations: Decoration[]) => boolean) | null,
}
@ -39,12 +39,12 @@ class VueNodeView implements NodeView {
isDragging = false
options: VueRendererOptions = {
options: VueNodeViewRendererOptions = {
stopEvent: null,
update: null,
}
constructor(component: Vue | VueConstructor, props: NodeViewRendererProps, options?: Partial<VueRendererOptions>) {
constructor(component: Vue | VueConstructor, props: NodeViewRendererProps, options?: Partial<VueNodeViewRendererOptions>) {
this.options = { ...this.options, ...options }
this.editor = props.editor
this.extension = props.extension
@ -314,7 +314,7 @@ class VueNodeView implements NodeView {
}
export default function VueRenderer(component: Vue | VueConstructor, options?: Partial<VueRendererOptions>): NodeViewRenderer {
export default function VueNodeViewRenderer(component: Vue | VueConstructor, options?: Partial<VueNodeViewRendererOptions>): NodeViewRenderer {
return (props: NodeViewRendererProps) => {
// try to get the parent component
// this is important for vue devtools to show the component hierarchy correctly

View File

@ -1,3 +1,3 @@
export * from '@tiptap/core'
export { default as VueRenderer } from './VueRenderer'
export { default as VueNodeViewRenderer } from './VueNodeViewRenderer'
export { default as EditorContent } from './components/EditorContent'