@contentful/field-editor-rich-text 3.25.2 → 3.26.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.
|
@@ -102,7 +102,9 @@ const ConnectedRichTextEditor = (props)=>{
|
|
|
102
102
|
}) : undefined, props.maxHeight !== undefined ? (0, _emotion.css)({
|
|
103
103
|
maxHeight: props.maxHeight
|
|
104
104
|
}) : undefined, props.isDisabled ? _RichTextEditorstyles.styles.disabled : _RichTextEditorstyles.styles.enabled, props.isToolbarHidden && _RichTextEditorstyles.styles.hiddenToolbar, direction === 'rtl' ? _RichTextEditorstyles.styles.rtl : _RichTextEditorstyles.styles.ltr);
|
|
105
|
-
return _react.createElement(
|
|
105
|
+
return _react.createElement(_fieldeditorreference.EntityProvider, {
|
|
106
|
+
sdk: sdk
|
|
107
|
+
}, _react.createElement(_SdkProvider.SdkProvider, {
|
|
106
108
|
sdk: sdk
|
|
107
109
|
}, _react.createElement(_ContentfulEditorProvider.ContentfulEditorIdProvider, {
|
|
108
110
|
value: id
|
|
@@ -125,15 +127,13 @@ const ConnectedRichTextEditor = (props)=>{
|
|
|
125
127
|
id: id,
|
|
126
128
|
className: classNames,
|
|
127
129
|
readOnly: props.isDisabled
|
|
128
|
-
})))));
|
|
130
|
+
}))))));
|
|
129
131
|
};
|
|
130
132
|
const RichTextEditor = (props)=>{
|
|
131
133
|
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, ...otherProps } = props;
|
|
132
134
|
const isEmptyValue = _react.useCallback((value)=>!value || (0, _fastdeepequal.default)(value, _richtexttypes.EMPTY_DOCUMENT), []);
|
|
133
135
|
const id = (0, _ContentfulEditorProvider.getContentfulEditorId)(props.sdk);
|
|
134
|
-
return _react.createElement(
|
|
135
|
-
sdk: sdk
|
|
136
|
-
}, _react.createElement(_fieldeditorshared.FieldConnector, {
|
|
136
|
+
return _react.createElement(_fieldeditorshared.FieldConnector, {
|
|
137
137
|
debounce: 0,
|
|
138
138
|
field: sdk.field,
|
|
139
139
|
isInitiallyDisabled: isInitiallyDisabled,
|
|
@@ -147,6 +147,6 @@ const RichTextEditor = (props)=>{
|
|
|
147
147
|
isDisabled: disabled,
|
|
148
148
|
onChange: setValue,
|
|
149
149
|
restrictedMarks: restrictedMarks
|
|
150
|
-
}))
|
|
150
|
+
}));
|
|
151
151
|
};
|
|
152
152
|
const _default = RichTextEditor;
|
|
@@ -38,7 +38,9 @@ export const ConnectedRichTextEditor = (props)=>{
|
|
|
38
38
|
}) : undefined, props.maxHeight !== undefined ? css({
|
|
39
39
|
maxHeight: props.maxHeight
|
|
40
40
|
}) : undefined, props.isDisabled ? styles.disabled : styles.enabled, props.isToolbarHidden && styles.hiddenToolbar, direction === 'rtl' ? styles.rtl : styles.ltr);
|
|
41
|
-
return React.createElement(
|
|
41
|
+
return React.createElement(EntityProvider, {
|
|
42
|
+
sdk: sdk
|
|
43
|
+
}, React.createElement(SdkProvider, {
|
|
42
44
|
sdk: sdk
|
|
43
45
|
}, React.createElement(ContentfulEditorIdProvider, {
|
|
44
46
|
value: id
|
|
@@ -61,15 +63,13 @@ export const ConnectedRichTextEditor = (props)=>{
|
|
|
61
63
|
id: id,
|
|
62
64
|
className: classNames,
|
|
63
65
|
readOnly: props.isDisabled
|
|
64
|
-
})))));
|
|
66
|
+
}))))));
|
|
65
67
|
};
|
|
66
68
|
const RichTextEditor = (props)=>{
|
|
67
69
|
const { sdk, isInitiallyDisabled, onAction, restrictedMarks, ...otherProps } = props;
|
|
68
70
|
const isEmptyValue = React.useCallback((value)=>!value || deepEquals(value, Contentful.EMPTY_DOCUMENT), []);
|
|
69
71
|
const id = getContentfulEditorId(props.sdk);
|
|
70
|
-
return React.createElement(
|
|
71
|
-
sdk: sdk
|
|
72
|
-
}, React.createElement(FieldConnector, {
|
|
72
|
+
return React.createElement(FieldConnector, {
|
|
73
73
|
debounce: 0,
|
|
74
74
|
field: sdk.field,
|
|
75
75
|
isInitiallyDisabled: isInitiallyDisabled,
|
|
@@ -83,6 +83,6 @@ const RichTextEditor = (props)=>{
|
|
|
83
83
|
isDisabled: disabled,
|
|
84
84
|
onChange: setValue,
|
|
85
85
|
restrictedMarks: restrictedMarks
|
|
86
|
-
}))
|
|
86
|
+
}));
|
|
87
87
|
};
|
|
88
88
|
export default RichTextEditor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@contentful/f36-icons": "^4.28.2",
|
|
45
45
|
"@contentful/f36-tokens": "^4.0.5",
|
|
46
46
|
"@contentful/f36-utils": "^4.24.3",
|
|
47
|
-
"@contentful/field-editor-reference": "^5.30.
|
|
47
|
+
"@contentful/field-editor-reference": "^5.30.2",
|
|
48
48
|
"@contentful/field-editor-shared": "^1.6.0",
|
|
49
49
|
"@contentful/rich-text-plain-text-renderer": "^16.0.4",
|
|
50
50
|
"@contentful/rich-text-types": "16.7.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"registry": "https://npm.pkg.github.com/"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "1e60c3ab6e5fdbe7b3694fcf55854fe209837751"
|
|
90
90
|
}
|