@frontify/fondue
Version:
Design system of Frontify
13 lines (12 loc) • 626 B
JavaScript
import { jsx as m } from "react/jsx-runtime";
import { LINK_PLUGIN as c } from "../id.es.js";
import { useRichTextEditorContext as a } from "../../../context/RichTextEditorContext.es.js";
const k = (e) => {
var t, n;
const { attributes: r, children: o } = e, { styles: s } = a(), l = e.element.url || ((n = (t = e.element.chosenLink) == null ? void 0 : t.searchResult) == null ? void 0 : n.link) || "", i = e.element.target || "_self";
return /* @__PURE__ */ m("a", { ...r, href: l, target: i, style: s[c], children: o });
};
export {
k as LinkMarkupElementNode
};
//# sourceMappingURL=LinkMarkupElementNode.es.js.map