mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 02:59:01 +08:00
20 lines
260 B
JavaScript
20 lines
260 B
JavaScript
import { Node } from 'tiptap'
|
|
|
|
export default class Title extends Node {
|
|
|
|
get name() {
|
|
return 'title'
|
|
}
|
|
|
|
get schema() {
|
|
return {
|
|
content: 'inline*',
|
|
parseDOM: [{
|
|
tag: 'h1',
|
|
}],
|
|
toDOM: () => ['h1', 0],
|
|
}
|
|
}
|
|
|
|
}
|