2021-11-11 11:23:49 +05:30
|
|
|
import { markInputRule } from '@tiptap/core';
|
|
|
|
import { Superscript } from '@tiptap/extension-superscript';
|
|
|
|
import { markInputRegex, extractMarkAttributesFromMatch } from '../services/mark_utils';
|
|
|
|
|
|
|
|
export default Superscript.extend({
|
|
|
|
addInputRules() {
|
2021-12-11 22:18:48 +05:30
|
|
|
return [
|
|
|
|
markInputRule({
|
|
|
|
find: markInputRegex('sup'),
|
|
|
|
type: this.type,
|
|
|
|
getAttributes: extractMarkAttributesFromMatch,
|
|
|
|
}),
|
|
|
|
];
|
2021-11-11 11:23:49 +05:30
|
|
|
},
|
|
|
|
});
|