Merge branch 'main' into feature/suggestions
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-alpha.10](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-alpha.9...@tiptap/core@2.0.0-alpha.10) (2021-01-06)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-alpha.9](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-alpha.8...@tiptap/core@2.0.0-alpha.9) (2020-12-18)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/core
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/core",
|
||||
"description": "headless rich text editor",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"version": "2.0.0-alpha.10",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -213,7 +213,9 @@ export class Editor extends EventEmitter {
|
||||
*/
|
||||
private createExtensionManager() {
|
||||
const coreExtensions = Object.entries(extensions).map(([, extension]) => extension)
|
||||
const allExtensions = [...this.options.extensions, ...coreExtensions]
|
||||
const allExtensions = [...this.options.extensions, ...coreExtensions].filter(extension => {
|
||||
return ['extension', 'node', 'mark'].includes(extension?.type)
|
||||
})
|
||||
|
||||
this.extensionManager = new ExtensionManager(allExtensions, this.proxy)
|
||||
}
|
||||
|
||||
9
packages/core/src/commands/createParagraphNear.ts
Normal file
9
packages/core/src/commands/createParagraphNear.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createParagraphNear as originalCreateParagraphNear } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Create a paragraph nearby.
|
||||
*/
|
||||
export const createParagraphNear = (): Command => ({ state, dispatch }) => {
|
||||
return originalCreateParagraphNear(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/exitCode.ts
Normal file
9
packages/core/src/commands/exitCode.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { exitCode as originalExitCode } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Exit from a code block.
|
||||
*/
|
||||
export const exitCode = (): Command => ({ state, dispatch }) => {
|
||||
return originalExitCode(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/joinBackward.ts
Normal file
9
packages/core/src/commands/joinBackward.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { joinBackward as originalJoinBackward } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Join two nodes backward.
|
||||
*/
|
||||
export const joinBackward = (): Command => ({ state, dispatch }) => {
|
||||
return originalJoinBackward(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/joinForward.ts
Normal file
9
packages/core/src/commands/joinForward.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { joinForward as originalJoinForward } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Join two nodes forward.
|
||||
*/
|
||||
export const joinForward = (): Command => ({ state, dispatch }) => {
|
||||
return originalJoinForward(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/liftEmptyBlock.ts
Normal file
9
packages/core/src/commands/liftEmptyBlock.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { liftEmptyBlock as originalLiftEmptyBlock } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Lift block if empty.
|
||||
*/
|
||||
export const liftEmptyBlock = (): Command => ({ state, dispatch }) => {
|
||||
return originalLiftEmptyBlock(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/newlineInCode.ts
Normal file
9
packages/core/src/commands/newlineInCode.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { newlineInCode as originalNewlineInCode } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Add a newline character in code.
|
||||
*/
|
||||
export const newlineInCode = (): Command => ({ state, dispatch }) => {
|
||||
return originalNewlineInCode(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/selectNodeBackward.ts
Normal file
9
packages/core/src/commands/selectNodeBackward.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { selectNodeBackward as originalSelectNodeBackward } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Select a node backward.
|
||||
*/
|
||||
export const selectNodeBackward = (): Command => ({ state, dispatch }) => {
|
||||
return originalSelectNodeBackward(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/selectNodeForward.ts
Normal file
9
packages/core/src/commands/selectNodeForward.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { selectNodeForward as originalSelectNodeForward } from 'prosemirror-commands'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Select a node forward.
|
||||
*/
|
||||
export const selectNodeForward = (): Command => ({ state, dispatch }) => {
|
||||
return originalSelectNodeForward(state, dispatch)
|
||||
}
|
||||
9
packages/core/src/commands/undoInputRule.ts
Normal file
9
packages/core/src/commands/undoInputRule.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { undoInputRule as originalUndoInputRule } from 'prosemirror-inputrules'
|
||||
import { Command } from '../types'
|
||||
|
||||
/**
|
||||
* Undo an input rule.
|
||||
*/
|
||||
export const undoInputRule = (): Command => ({ state, dispatch }) => {
|
||||
return originalUndoInputRule(state, dispatch)
|
||||
}
|
||||
@@ -1,19 +1,27 @@
|
||||
import { Extension } from '../Extension'
|
||||
import * as blur from '../commands/blur'
|
||||
import * as clearContent from '../commands/clearContent'
|
||||
import * as command from '../commands/command'
|
||||
import * as clearNodes from '../commands/clearNodes'
|
||||
import * as command from '../commands/command'
|
||||
import * as createParagraphNear from '../commands/createParagraphNear'
|
||||
import * as deleteSelection from '../commands/deleteSelection'
|
||||
import * as exitCode from '../commands/exitCode'
|
||||
import * as extendMarkRange from '../commands/extendMarkRange'
|
||||
import * as first from '../commands/first'
|
||||
import * as focus from '../commands/focus'
|
||||
import * as insertHTML from '../commands/insertHTML'
|
||||
import * as insertText from '../commands/insertText'
|
||||
import * as joinBackward from '../commands/joinBackward'
|
||||
import * as joinForward from '../commands/joinForward'
|
||||
import * as lift from '../commands/lift'
|
||||
import * as liftEmptyBlock from '../commands/liftEmptyBlock'
|
||||
import * as liftListItem from '../commands/liftListItem'
|
||||
import * as newlineInCode from '../commands/newlineInCode'
|
||||
import * as resetNodeAttributes from '../commands/resetNodeAttributes'
|
||||
import * as scrollIntoView from '../commands/scrollIntoView'
|
||||
import * as selectAll from '../commands/selectAll'
|
||||
import * as selectNodeBackward from '../commands/selectNodeBackward'
|
||||
import * as selectNodeForward from '../commands/selectNodeForward'
|
||||
import * as selectParentNode from '../commands/selectParentNode'
|
||||
import * as setContent from '../commands/setContent'
|
||||
import * as setMark from '../commands/setMark'
|
||||
@@ -25,6 +33,7 @@ import * as toggleList from '../commands/toggleList'
|
||||
import * as toggleMark from '../commands/toggleMark'
|
||||
import * as toggleNode from '../commands/toggleNode'
|
||||
import * as toggleWrap from '../commands/toggleWrap'
|
||||
import * as undoInputRule from '../commands/undoInputRule'
|
||||
import * as unsetAllMarks from '../commands/unsetAllMarks'
|
||||
import * as unsetMark from '../commands/unsetMark'
|
||||
import * as updateNodeAttributes from '../commands/updateNodeAttributes'
|
||||
@@ -40,17 +49,25 @@ export const Commands = Extension.create({
|
||||
...clearContent,
|
||||
...clearNodes,
|
||||
...command,
|
||||
...createParagraphNear,
|
||||
...deleteSelection,
|
||||
...exitCode,
|
||||
...extendMarkRange,
|
||||
...first,
|
||||
...focus,
|
||||
...insertHTML,
|
||||
...insertText,
|
||||
...joinBackward,
|
||||
...joinForward,
|
||||
...lift,
|
||||
...liftEmptyBlock,
|
||||
...liftListItem,
|
||||
...newlineInCode,
|
||||
...resetNodeAttributes,
|
||||
...scrollIntoView,
|
||||
...selectAll,
|
||||
...selectNodeBackward,
|
||||
...selectNodeForward,
|
||||
...selectParentNode,
|
||||
...setContent,
|
||||
...setMark,
|
||||
@@ -62,8 +79,9 @@ export const Commands = Extension.create({
|
||||
...toggleMark,
|
||||
...toggleNode,
|
||||
...toggleWrap,
|
||||
...unsetMark,
|
||||
...undoInputRule,
|
||||
...unsetAllMarks,
|
||||
...unsetMark,
|
||||
...updateNodeAttributes,
|
||||
...wrapIn,
|
||||
...wrapInList,
|
||||
|
||||
@@ -1,48 +1,36 @@
|
||||
import {
|
||||
newlineInCode,
|
||||
createParagraphNear,
|
||||
liftEmptyBlock,
|
||||
exitCode,
|
||||
deleteSelection,
|
||||
joinForward,
|
||||
joinBackward,
|
||||
selectNodeForward,
|
||||
selectNodeBackward,
|
||||
} from 'prosemirror-commands'
|
||||
import { undoInputRule } from 'prosemirror-inputrules'
|
||||
import { Extension } from '../Extension'
|
||||
|
||||
export const Keymap = Extension.create({
|
||||
name: 'keymap',
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
const handleBackspace = () => this.editor.commands.first(({ state, dispatch }) => [
|
||||
() => undoInputRule(state, dispatch),
|
||||
() => deleteSelection(state, dispatch),
|
||||
() => joinBackward(state, dispatch),
|
||||
() => selectNodeBackward(state, dispatch),
|
||||
const handleBackspace = () => this.editor.commands.first(({ commands }) => [
|
||||
() => commands.undoInputRule(),
|
||||
() => commands.deleteSelection(),
|
||||
() => commands.joinBackward(),
|
||||
() => commands.selectNodeBackward(),
|
||||
])
|
||||
|
||||
const handleDelete = () => this.editor.commands.first(({ state, dispatch }) => [
|
||||
() => deleteSelection(state, dispatch),
|
||||
() => joinForward(state, dispatch),
|
||||
() => selectNodeForward(state, dispatch),
|
||||
const handleDelete = () => this.editor.commands.first(({ commands }) => [
|
||||
() => commands.deleteSelection(),
|
||||
() => commands.joinForward(),
|
||||
() => commands.selectNodeForward(),
|
||||
])
|
||||
|
||||
return {
|
||||
Enter: () => this.editor.commands.first(({ commands, state, dispatch }) => [
|
||||
() => newlineInCode(state, dispatch),
|
||||
() => createParagraphNear(state, dispatch),
|
||||
() => liftEmptyBlock(state, dispatch),
|
||||
Enter: () => this.editor.commands.first(({ commands }) => [
|
||||
() => commands.newlineInCode(),
|
||||
() => commands.createParagraphNear(),
|
||||
() => commands.liftEmptyBlock(),
|
||||
() => commands.splitBlock(),
|
||||
]),
|
||||
'Mod-Enter': exitCode,
|
||||
'Mod-Enter': () => this.editor.commands.exitCode(),
|
||||
Backspace: () => handleBackspace(),
|
||||
'Mod-Backspace': () => handleBackspace(),
|
||||
Delete: () => handleDelete(),
|
||||
'Mod-Delete': () => handleDelete(),
|
||||
// we don’t need a custom `selectAll` for now
|
||||
// 'Mod-a': () => this.editor.selectAll(),
|
||||
// 'Mod-a': () => this.editor.commands.selectAll(),
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -97,7 +97,7 @@ export type NodeViewRendererProps = {
|
||||
extension: Node,
|
||||
}
|
||||
|
||||
export type NodeViewRenderer = (props: NodeViewRendererProps) => NodeView
|
||||
export type NodeViewRenderer = (props: NodeViewRendererProps) => (NodeView | {})
|
||||
|
||||
export type UnfilteredCommands = {
|
||||
[Item in keyof AllExtensions]: AllExtensions[Item] extends Extension<any, infer ExtensionCommands>
|
||||
|
||||
@@ -7,14 +7,27 @@ import {
|
||||
} from 'y-prosemirror'
|
||||
|
||||
export interface CollaborationOptions {
|
||||
provider: any,
|
||||
/**
|
||||
* An initialized Y.js document.
|
||||
*/
|
||||
document: any,
|
||||
/**
|
||||
* Name of a Y.js fragment, can be changed to sync multiple fields with one Y.js document.
|
||||
*/
|
||||
field: string,
|
||||
/**
|
||||
* A raw Y.js fragment, can be used instead of `document` and `field`.
|
||||
*/
|
||||
fragment: any,
|
||||
}
|
||||
|
||||
export const Collaboration = Extension.create({
|
||||
name: 'collaboration',
|
||||
|
||||
defaultOptions: <CollaborationOptions>{
|
||||
provider: null,
|
||||
document: null,
|
||||
field: 'default',
|
||||
fragment: null,
|
||||
},
|
||||
|
||||
addCommands() {
|
||||
@@ -47,17 +60,15 @@ export const Collaboration = Extension.create({
|
||||
},
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
const fragment = this.options.fragment
|
||||
? this.options.fragment
|
||||
: this.options.document.getXmlFragment(this.options.field)
|
||||
|
||||
return [
|
||||
ySyncPlugin(
|
||||
this.options.provider.doc.getXmlFragment('prosemirror'),
|
||||
),
|
||||
ySyncPlugin(fragment),
|
||||
yUndoPlugin(),
|
||||
]
|
||||
},
|
||||
|
||||
onDestroy() {
|
||||
this.options.provider?.destroy()
|
||||
},
|
||||
})
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-alpha.6](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-text-align@2.0.0-alpha.5...@tiptap/extension-text-align@2.0.0-alpha.6) (2021-01-06)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-text-align
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-text-align@2.0.0-alpha.4...@tiptap/extension-text-align@2.0.0-alpha.5) (2020-12-18)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-text-align
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/extension-text-align",
|
||||
"description": "text align extension for tiptap",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"version": "2.0.0-alpha.6",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -59,10 +59,14 @@ export const TextAlign = Extension.create({
|
||||
return {
|
||||
// TODO: re-use only 'textAlign' attribute
|
||||
// TODO: use custom splitBlock only for `this.options.types`
|
||||
// TODO: use complete default enter handler (chainCommand) with custom splitBlock
|
||||
Enter: () => this.editor.commands.splitBlock({
|
||||
withAttributes: true,
|
||||
}),
|
||||
Enter: () => this.editor.commands.first(({ commands }) => [
|
||||
() => commands.newlineInCode(),
|
||||
() => commands.createParagraphNear(),
|
||||
() => commands.liftEmptyBlock(),
|
||||
() => commands.splitBlock({
|
||||
withAttributes: true,
|
||||
}),
|
||||
]),
|
||||
'Mod-Shift-l': () => this.editor.commands.setTextAlign('left'),
|
||||
'Mod-Shift-e': () => this.editor.commands.setTextAlign('center'),
|
||||
'Mod-Shift-r': () => this.editor.commands.setTextAlign('right'),
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-alpha.6](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/html@2.0.0-alpha.5...@tiptap/html@2.0.0-alpha.6) (2021-01-06)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/html@2.0.0-alpha.4...@tiptap/html@2.0.0-alpha.5) (2020-12-18)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/html
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/html",
|
||||
"description": "utility package to render tiptap JSON as HTML",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"version": "2.0.0-alpha.6",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
@@ -22,8 +22,8 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tiptap/core": "^2.0.0-alpha.9",
|
||||
"hostic-dom": "^0.8.5",
|
||||
"@tiptap/core": "^2.0.0-alpha.10",
|
||||
"hostic-dom": "^0.8.6",
|
||||
"prosemirror-model": "^1.12.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
"@tiptap/extension-ordered-list": "^2.0.0-alpha.5",
|
||||
"@tiptap/extension-paragraph": "^2.0.0-alpha.5",
|
||||
"@tiptap/extension-strike": "^2.0.0-alpha.5",
|
||||
"@tiptap/extension-text": "^2.0.0-alpha.5",
|
||||
"@tiptap/extension-underline": "^2.0.0-alpha.5"
|
||||
"@tiptap/extension-text": "^2.0.0-alpha.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-alpha.9](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue-starter-kit@2.0.0-alpha.8...@tiptap/vue-starter-kit@2.0.0-alpha.9) (2021-01-06)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue-starter-kit
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-alpha.8](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue-starter-kit@2.0.0-alpha.7...@tiptap/vue-starter-kit@2.0.0-alpha.8) (2020-12-18)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue-starter-kit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/vue-starter-kit",
|
||||
"description": "Vue starter kit for tiptap",
|
||||
"version": "2.0.0-alpha.8",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
@@ -23,6 +23,6 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@tiptap/starter-kit": "^2.0.0-alpha.7",
|
||||
"@tiptap/vue": "^2.0.0-alpha.5"
|
||||
"@tiptap/vue": "^2.0.0-alpha.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-alpha.6](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue@2.0.0-alpha.5...@tiptap/vue@2.0.0-alpha.6) (2021-01-06)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue@2.0.0-alpha.4...@tiptap/vue@2.0.0-alpha.5) (2020-12-18)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/vue",
|
||||
"description": "Vue components for tiptap",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"version": "2.0.0-alpha.6",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { Editor, Node, NodeViewRendererProps } from '@tiptap/core'
|
||||
import {
|
||||
Editor,
|
||||
Node,
|
||||
NodeViewRenderer,
|
||||
NodeViewRendererProps,
|
||||
} from '@tiptap/core'
|
||||
import { Decoration, NodeView } from 'prosemirror-view'
|
||||
import { NodeSelection } from 'prosemirror-state'
|
||||
import { Node as ProseMirrorNode } from 'prosemirror-model'
|
||||
@@ -115,7 +120,7 @@ class VueNodeView implements NodeView {
|
||||
style: {
|
||||
whiteSpace: 'pre-wrap',
|
||||
},
|
||||
attrs: {
|
||||
domProps: {
|
||||
id,
|
||||
contenteditable: isEditable,
|
||||
},
|
||||
@@ -309,7 +314,7 @@ class VueNodeView implements NodeView {
|
||||
|
||||
}
|
||||
|
||||
export default function VueRenderer(component: Vue | VueConstructor, options?: Partial<VueRendererOptions>) {
|
||||
export default function VueRenderer(component: Vue | VueConstructor, options?: Partial<VueRendererOptions>): NodeViewRenderer {
|
||||
return (props: NodeViewRendererProps) => {
|
||||
// try to get the parent component
|
||||
// this is important for vue devtools to show the component hierarchy correctly
|
||||
@@ -319,7 +324,7 @@ export default function VueRenderer(component: Vue | VueConstructor, options?: P
|
||||
: undefined
|
||||
|
||||
if (!parent) {
|
||||
return undefined
|
||||
return {}
|
||||
}
|
||||
|
||||
return new VueNodeView(component, props, options) as NodeView
|
||||
|
||||
Reference in New Issue
Block a user