fix build for now

This commit is contained in:
Philipp Kühn
2020-11-10 16:29:31 +01:00
parent 960368db0e
commit d3b4e7a1d4
77 changed files with 28 additions and 64 deletions

View File

@@ -0,0 +1,42 @@
import { Command, createNode } from '@tiptap/core'
// import ParagraphComponent from './paragraph.vue'
const Paragraph = createNode({
name: 'paragraph',
group: 'block',
content: 'inline*',
parseHTML() {
return [
{ tag: 'p' },
]
},
renderHTML({ attributes }) {
return ['p', attributes, 0]
},
addCommands() {
return {
paragraph: (): Command => ({ commands }) => {
return commands.toggleBlockType('paragraph', 'paragraph')
},
}
},
addKeyboardShortcuts() {
return {
'Mod-Alt-0': () => this.editor.paragraph(),
}
},
})
export default Paragraph
declare module '@tiptap/core/src/Editor' {
interface AllExtensions {
Paragraph: typeof Paragraph,
}
}