debian-mirror-gitlab/app/assets/javascripts/content_editor/extensions/superscript.js
2021-11-11 11:23:49 +05:30

9 lines
356 B
JavaScript

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)];
},
});