tiptap/packages/core/src/Mark.ts

19 lines
322 B
TypeScript
Raw Normal View History

2020-03-30 18:40:25 +08:00
import Extension from './Extension'
2020-04-01 04:57:39 +08:00
import { MarkSpec } from 'prosemirror-model'
2020-03-30 18:40:25 +08:00
export default abstract class Mark extends Extension {
constructor(options = {}) {
super(options)
}
public type = 'mark'
2020-04-01 04:57:39 +08:00
abstract schema(): MarkSpec
2020-03-30 18:40:25 +08:00
get schemaType() {
return this.editor.schema.marks[this.name]
}
}