@contentful/field-editor-rich-text 4.1.10 → 4.2.0
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.
|
@@ -131,7 +131,7 @@ const ConnectedRichTextEditor = (props)=>{
|
|
|
131
131
|
}))))));
|
|
132
132
|
};
|
|
133
133
|
const RichTextEditor = (props)=>{
|
|
134
|
-
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, ...otherProps } = props;
|
|
134
|
+
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, isDisabled, ...otherProps } = props;
|
|
135
135
|
const isEmptyValue = _react.useCallback((value)=>!value || (0, _fastdeepequal.default)(value, _richtexttypes.EMPTY_DOCUMENT), []);
|
|
136
136
|
_react.useEffect(()=>{
|
|
137
137
|
if (!onChange) {
|
|
@@ -147,7 +147,8 @@ const RichTextEditor = (props)=>{
|
|
|
147
147
|
debounce: 0,
|
|
148
148
|
field: sdk.field,
|
|
149
149
|
isInitiallyDisabled: isInitiallyDisabled,
|
|
150
|
-
isEmptyValue: isEmptyValue
|
|
150
|
+
isEmptyValue: isEmptyValue,
|
|
151
|
+
isDisabled: isDisabled
|
|
151
152
|
}, ({ lastRemoteValue, disabled, setValue })=>_react.createElement(ConnectedRichTextEditor, {
|
|
152
153
|
...otherProps,
|
|
153
154
|
key: `rich-text-editor-${id}`,
|
|
@@ -67,7 +67,7 @@ export const ConnectedRichTextEditor = (props)=>{
|
|
|
67
67
|
}))))));
|
|
68
68
|
};
|
|
69
69
|
const RichTextEditor = (props)=>{
|
|
70
|
-
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, ...otherProps } = props;
|
|
70
|
+
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, onChange, isDisabled, ...otherProps } = props;
|
|
71
71
|
const isEmptyValue = React.useCallback((value)=>!value || deepEquals(value, Contentful.EMPTY_DOCUMENT), []);
|
|
72
72
|
React.useEffect(()=>{
|
|
73
73
|
if (!onChange) {
|
|
@@ -83,7 +83,8 @@ const RichTextEditor = (props)=>{
|
|
|
83
83
|
debounce: 0,
|
|
84
84
|
field: sdk.field,
|
|
85
85
|
isInitiallyDisabled: isInitiallyDisabled,
|
|
86
|
-
isEmptyValue: isEmptyValue
|
|
86
|
+
isEmptyValue: isEmptyValue,
|
|
87
|
+
isDisabled: isDisabled
|
|
87
88
|
}, ({ lastRemoteValue, disabled, setValue })=>React.createElement(ConnectedRichTextEditor, {
|
|
88
89
|
...otherProps,
|
|
89
90
|
key: `rich-text-editor-${id}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"registry": "https://npm.pkg.github.com/"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "28c4e05014732ce423e75ab34dd139c887d7efbd"
|
|
90
90
|
}
|