@frontify/fondue
Version:
Design system of Frontify
43 lines (42 loc) • 1.01 kB
JavaScript
import { createBoldPlugin as e } from "@udecode/plate-basic-marks";
import { Plugin as t } from "../../Plugin.es.js";
import { BoldButton as r } from "./BoldButton.es.js";
import { BoldMarkupElement as l, BOLD_CLASSES as m } from "./BoldMarkupElement.es.js";
import { BoldMarkupElementNode as S } from "./BoldMarkupElement.es.js";
import { BOLD_PLUGIN as i } from "./id.es.js";
const d = [
{ validNodeName: ["STRONG", "B"] },
{
validStyle: {
fontWeight: ["600", "700", "bold"]
}
}
];
class N extends t {
constructor(o) {
super(i, {
button: r,
markupElement: new l(),
...o
});
}
plugins() {
return [
e({
deserializeHtml: {
rules: [...d, { validNodeName: ["SPAN"], validClassName: m }]
},
options: {
hotkey: ["mod+b", "ctrl+b"]
}
})
];
}
}
export {
m as BOLD_CLASSES,
l as BoldMarkupElement,
S as BoldMarkupElementNode,
N as BoldPlugin
};
//# sourceMappingURL=index.es.js.map