reactjs-tiptap-editor
Version:
A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React
17 lines (16 loc) • 495 B
JavaScript
import { c as a, s as n, f as l } from "./index-Qcl3BG94.js";
import { d as p } from "./clsx-DaPvp9ji.js";
function m(o, t) {
a({
getBoundingClientRect: () => p(o.view, o.state.selection.from, o.state.selection.to)
}, t, {
placement: "bottom-start",
strategy: "absolute",
middleware: [n(), l()]
}).then(({ x: s, y: i, strategy: e }) => {
t.style.width = "max-content", t.style.position = e, t.style.left = `${s}px`, t.style.top = `${i}px`;
});
}
export {
m as u
};