@contentful/field-editor-rich-text 3.8.2 → 3.9.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.
@@ -103,6 +103,8 @@ const ConnectedRichTextEditor = (props)=>{
103
103
  ]);
104
104
  const classNames = (0, _emotion.cx)(_RichTextEditorstyles.styles.editor, props.minHeight !== undefined ? (0, _emotion.css)({
105
105
  minHeight: props.minHeight
106
+ }) : undefined, props.maxHeight !== undefined ? (0, _emotion.css)({
107
+ maxHeight: props.maxHeight
106
108
  }) : undefined, props.isDisabled ? _RichTextEditorstyles.styles.disabled : _RichTextEditorstyles.styles.enabled, props.isToolbarHidden && _RichTextEditorstyles.styles.hiddenToolbar);
107
109
  return _react.createElement(_SdkProvider.SdkProvider, {
108
110
  sdk: sdk
@@ -28,6 +28,7 @@ const styles = {
28
28
  fontSize: _f36tokens.default.spacingM,
29
29
  fontFamily: _f36tokens.default.fontStackPrimary,
30
30
  minHeight: '400px',
31
+ overflowY: 'auto',
31
32
  background: _f36tokens.default.colorWhite,
32
33
  outline: 'none',
33
34
  whiteSpace: 'pre-wrap',
@@ -41,6 +41,8 @@ export const ConnectedRichTextEditor = (props)=>{
41
41
  ]);
42
42
  const classNames = cx(styles.editor, props.minHeight !== undefined ? css({
43
43
  minHeight: props.minHeight
44
+ }) : undefined, props.maxHeight !== undefined ? css({
45
+ maxHeight: props.maxHeight
44
46
  }) : undefined, props.isDisabled ? styles.disabled : styles.enabled, props.isToolbarHidden && styles.hiddenToolbar);
45
47
  return React.createElement(SdkProvider, {
46
48
  sdk: sdk
@@ -13,6 +13,7 @@ export const styles = {
13
13
  fontSize: tokens.spacingM,
14
14
  fontFamily: tokens.fontStackPrimary,
15
15
  minHeight: '400px',
16
+ overflowY: 'auto',
16
17
  background: tokens.colorWhite,
17
18
  outline: 'none',
18
19
  whiteSpace: 'pre-wrap',
@@ -6,6 +6,7 @@ type ConnectedProps = {
6
6
  sdk: FieldExtensionSDK;
7
7
  onAction?: RichTextTrackingActionHandler;
8
8
  minHeight?: string | number;
9
+ maxHeight?: string | number;
9
10
  value?: Contentful.Document;
10
11
  isDisabled?: boolean;
11
12
  onChange?: (doc: Contentful.Document) => unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "3.8.2",
3
+ "version": "3.9.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.1.1",
45
45
  "@contentful/f36-tokens": "^4.0.0",
46
46
  "@contentful/f36-utils": "^4.19.0",
47
- "@contentful/field-editor-reference": "^5.13.0",
47
+ "@contentful/field-editor-reference": "^5.13.1",
48
48
  "@contentful/field-editor-shared": "^1.3.0",
49
49
  "@contentful/rich-text-plain-text-renderer": "^16.0.4",
50
50
  "@contentful/rich-text-types": "16.1.0",
@@ -81,5 +81,5 @@
81
81
  "prism-react-renderer": "2.0.5",
82
82
  "react": ">=16.14.0"
83
83
  },
84
- "gitHead": "2a23fcf8d6a1ee441274f5020ad94e847fd93ad4"
84
+ "gitHead": "92c8dbd53b34e1e584588b274105ed392691fb7c"
85
85
  }