@thangph2146/lexical-editor 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor-x/editor.cjs +9 -4
- package/dist/editor-x/editor.cjs.map +1 -1
- package/dist/editor-x/editor.css +3 -0
- package/dist/editor-x/editor.css.map +1 -1
- package/dist/editor-x/editor.js +9 -4
- package/dist/editor-x/editor.js.map +1 -1
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/editor-ui/content-editable.tsx +8 -3
- package/src/editor-x/plugins.tsx +3 -3
- package/src/themes/ui-components.scss +4 -0
package/dist/editor-x/editor.cjs
CHANGED
|
@@ -5062,10 +5062,15 @@ function ContentEditable({
|
|
|
5062
5062
|
placeholderClassName,
|
|
5063
5063
|
placeholderDefaults = true
|
|
5064
5064
|
}) {
|
|
5065
|
+
const isReadOnly = className?.includes("--readonly");
|
|
5065
5066
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5066
5067
|
LexicalContentEditable.ContentEditable,
|
|
5067
5068
|
{
|
|
5068
|
-
className: cn(
|
|
5069
|
+
className: cn(
|
|
5070
|
+
"ContentEditable__root relative block focus:outline-none",
|
|
5071
|
+
!isReadOnly && "min-h-72 px-8 py-4",
|
|
5072
|
+
className
|
|
5073
|
+
),
|
|
5069
5074
|
"aria-placeholder": placeholder2,
|
|
5070
5075
|
"aria-label": placeholder2 || "Editor n\u1ED9i dung",
|
|
5071
5076
|
placeholder: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5074,7 +5079,7 @@ function ContentEditable({
|
|
|
5074
5079
|
className: cn(
|
|
5075
5080
|
placeholderClassName,
|
|
5076
5081
|
"text-muted-foreground pointer-events-none select-none",
|
|
5077
|
-
placeholderDefaults && "absolute top-0 left-0 overflow-hidden px-8 py-[18px] text-ellipsis"
|
|
5082
|
+
placeholderDefaults && !isReadOnly && "absolute top-0 left-0 overflow-hidden px-8 py-[18px] text-ellipsis"
|
|
5078
5083
|
),
|
|
5079
5084
|
children: placeholder2
|
|
5080
5085
|
}
|
|
@@ -32667,11 +32672,11 @@ function Plugins({
|
|
|
32667
32672
|
] })
|
|
32668
32673
|
}
|
|
32669
32674
|
),
|
|
32670
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "editor-relative-full", children: [
|
|
32675
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("editor-relative-full"), children: [
|
|
32671
32676
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32672
32677
|
LexicalRichTextPlugin.RichTextPlugin,
|
|
32673
32678
|
{
|
|
32674
|
-
contentEditable: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "editor-relative-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "editor-relative-full", ref: onRef, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32679
|
+
contentEditable: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("editor-relative-full"), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("editor-relative-full"), ref: onRef, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32675
32680
|
ContentEditable,
|
|
32676
32681
|
{
|
|
32677
32682
|
placeholder: readOnly ? "" : placeholder,
|