@frontify/fondue
Version:
Design system of Frontify
43 lines (42 loc) • 1.01 kB
JavaScript
import { createItalicPlugin as e } from "@udecode/plate-basic-marks";
import { Plugin as o } from "../../Plugin.es.js";
import { ItalicButton as i } from "./ItalicButton.es.js";
import { ItalicMarkupElement as l, ITALIC_CLASSES as r } from "./ItalicMarkupElement.es.js";
import { ItalicMarkupElementNode as E } from "./ItalicMarkupElement.es.js";
import { ITALIC_PLUGIN as a } from "./id.es.js";
const m = [
{ validNodeName: ["EM", "I"] },
{
validStyle: {
fontStyle: "italic"
}
}
];
class d extends o {
constructor(t) {
super(a, {
button: i,
markupElement: new l(),
...t
});
}
plugins() {
return [
e({
deserializeHtml: {
rules: [...m, { validNodeName: ["SPAN"], validClassName: r }]
},
options: {
hotkey: ["mod+i", "ctrl+i"]
}
})
];
}
}
export {
r as ITALIC_CLASSES,
l as ItalicMarkupElement,
E as ItalicMarkupElementNode,
d as ItalicPlugin
};
//# sourceMappingURL=index.es.js.map