Welcome to mirror list, hosted at ThFree Co, Russian Federation.

horizontal_rule.js « extensions « content_editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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)];
  },
});