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

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

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