@rtdui/editor
Version:
React rich text editor based on tiptap
44 lines (40 loc) • 1.73 kB
JavaScript
'use client';
'use strict';
var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var iconsReact = require('@tabler/icons-react');
var core = require('@rtdui/core');
var clsx = require('clsx');
var editorMan = require('./editorMan.mdx.cjs');
const HelperControl = React.forwardRef(
(props, ref) => {
const { className, ...other } = { ...props };
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
/* @__PURE__ */ jsxRuntime.jsx(
"button",
{
type: "button",
className: "btn btn-square btn-sm",
onClick: () => document.getElementById("edit_helper_dialog")?.showModal(),
children: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconHelp, { size: 20, stroke: 1.5 })
}
),
/* @__PURE__ */ jsxRuntime.jsx("dialog", { id: "edit_helper_dialog", className: "modal", children: /* @__PURE__ */ jsxRuntime.jsxs(
"div",
{
className: clsx(
"modal-box flex flex-col p-6 w-11/12 max-w-5xl",
className
),
children: [
/* @__PURE__ */ jsxRuntime.jsx("form", { method: "dialog", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 flex justify-end mb-1", children: /* @__PURE__ */ jsxRuntime.jsx(core.CloseButton, { type: "submit" }) }) }),
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto prose max-w-none", ...other, children: /* @__PURE__ */ jsxRuntime.jsx(editorMan, {}) })
]
}
) })
] });
}
);
HelperControl.displayName = "@rtdui/editor/HelperControl";
exports.HelperControl = HelperControl;
//# sourceMappingURL=HelperControl.cjs.map