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

superscript.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: 6cd814977ea9f36baf62187668eb77b67f71f940 (plain)
1
2
3
4
5
6
7
8
9
import { markInputRule } from '@tiptap/core';
import { Superscript } from '@tiptap/extension-superscript';
import { markInputRegex, extractMarkAttributesFromMatch } from '../services/mark_utils';

export default Superscript.extend({
  addInputRules() {
    return [markInputRule(markInputRegex('sup'), this.type, extractMarkAttributesFromMatch)];
  },
});