2021-08-25 18:11:33 +00:00
|
|
|
import { markInputRule } from '@tiptap/core';
|
|
|
|
import { Superscript } from '@tiptap/extension-superscript';
|
|
|
|
import { markInputRegex, extractMarkAttributesFromMatch } from '../services/mark_utils';
|
|
|
|
|
|
|
|
export default Superscript.extend({
|
|
|
|
addInputRules() {
|
2021-10-22 09:09:20 +00:00
|
|
|
return [
|
|
|
|
markInputRule({
|
|
|
|
find: markInputRegex('sup'),
|
|
|
|
type: this.type,
|
|
|
|
getAttributes: extractMarkAttributesFromMatch,
|
|
|
|
}),
|
|
|
|
];
|
2021-08-25 18:11:33 +00:00
|
|
|
},
|
|
|
|
});
|