blob: c8ec45d835ccc88ab6ecc028026ce9e2c4c62f1c (
plain)
1
2
3
4
5
6
7
8
9
10
|
import { nodeInputRule } from '@tiptap/core';
import { HorizontalRule } from '@tiptap/extension-horizontal-rule';
export const hrInputRuleRegExp = /^---$/;
export default HorizontalRule.extend({
addInputRules() {
return [nodeInputRule(hrInputRuleRegExp, this.type)];
},
});
|