gitlab-org--gitlab-foss/app/assets/javascripts/content_editor/extensions/superscript.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
431 B
JavaScript
Raw Normal View History

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({
find: markInputRegex('sup'),
type: this.type,
getAttributes: extractMarkAttributesFromMatch,
}),
];
},
});