@edifice.io/tiptap-extensions
Version:
Edifice Rich Text Editor Extensions
29 lines (28 loc) • 591 B
JavaScript
import Highlight from "@tiptap/extension-highlight";
const CustomHighlight = Highlight.extend({
name: "customHighlight",
addOptions() {
var _a;
return {
...(_a = this.parent) == null ? void 0 : _a.call(this),
multicolor: !0,
HTMLAttributes: {}
};
},
parseHTML() {
var _a;
return [
{
...(_a = this.parent) == null ? void 0 : _a.call(this),
style: "background-color",
getAttrs: (style) => ({
color: style
})
}
];
}
});
export {
CustomHighlight
};
//# sourceMappingURL=highlight.js.map