@contentful/field-editor-rich-text 3.28.1 → 3.29.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.
- package/dist/cjs/RichTextEditor.js +2 -1
- package/dist/cjs/Toolbar/components/StickyToolbarWrapper.js +4 -4
- package/dist/esm/RichTextEditor.js +2 -1
- package/dist/esm/Toolbar/components/StickyToolbarWrapper.js +4 -4
- package/dist/types/RichTextEditor.d.ts +1 -0
- package/dist/types/Toolbar/components/StickyToolbarWrapper.d.ts +2 -1
- package/package.json +3 -3
|
@@ -117,7 +117,8 @@ const ConnectedRichTextEditor = (props)=>{
|
|
|
117
117
|
plugins: plugins,
|
|
118
118
|
disableCorePlugins: _plugins.disableCorePlugins
|
|
119
119
|
}, !props.isToolbarHidden && _react.createElement(_StickyToolbarWrapper.default, {
|
|
120
|
-
isDisabled: props.isDisabled
|
|
120
|
+
isDisabled: props.isDisabled,
|
|
121
|
+
offset: props.stickyToolbarOffset
|
|
121
122
|
}, _react.createElement(_Toolbar.default, {
|
|
122
123
|
isDisabled: props.isDisabled
|
|
123
124
|
})), _react.createElement(_SyncEditorChanges.SyncEditorChanges, {
|
|
@@ -16,14 +16,14 @@ function _interop_require_default(obj) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
const styles = {
|
|
19
|
-
nativeSticky: (0, _emotion.css)`
|
|
19
|
+
nativeSticky: (offset)=>(0, _emotion.css)`
|
|
20
20
|
position: -webkit-sticky;
|
|
21
21
|
position: sticky;
|
|
22
|
-
top: -
|
|
22
|
+
top: ${offset ? offset : -1}px;
|
|
23
23
|
z-index: 2;
|
|
24
24
|
`
|
|
25
25
|
};
|
|
26
|
-
const StickyToolbarWrapper = ({ isDisabled, children })=>_react.default.createElement("div", {
|
|
27
|
-
className: isDisabled ? '' : styles.nativeSticky
|
|
26
|
+
const StickyToolbarWrapper = ({ isDisabled, offset, children })=>_react.default.createElement("div", {
|
|
27
|
+
className: isDisabled ? '' : styles.nativeSticky(offset)
|
|
28
28
|
}, children);
|
|
29
29
|
const _default = StickyToolbarWrapper;
|
|
@@ -53,7 +53,8 @@ export const ConnectedRichTextEditor = (props)=>{
|
|
|
53
53
|
plugins: plugins,
|
|
54
54
|
disableCorePlugins: disableCorePlugins
|
|
55
55
|
}, !props.isToolbarHidden && React.createElement(StickyToolbarWrapper, {
|
|
56
|
-
isDisabled: props.isDisabled
|
|
56
|
+
isDisabled: props.isDisabled,
|
|
57
|
+
offset: props.stickyToolbarOffset
|
|
57
58
|
}, React.createElement(Toolbar, {
|
|
58
59
|
isDisabled: props.isDisabled
|
|
59
60
|
})), React.createElement(SyncEditorChanges, {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { css } from 'emotion';
|
|
3
3
|
const styles = {
|
|
4
|
-
nativeSticky: css`
|
|
4
|
+
nativeSticky: (offset)=>css`
|
|
5
5
|
position: -webkit-sticky;
|
|
6
6
|
position: sticky;
|
|
7
|
-
top: -
|
|
7
|
+
top: ${offset ? offset : -1}px;
|
|
8
8
|
z-index: 2;
|
|
9
9
|
`
|
|
10
10
|
};
|
|
11
|
-
const StickyToolbarWrapper = ({ isDisabled, children })=>React.createElement("div", {
|
|
12
|
-
className: isDisabled ? '' : styles.nativeSticky
|
|
11
|
+
const StickyToolbarWrapper = ({ isDisabled, offset, children })=>React.createElement("div", {
|
|
12
|
+
className: isDisabled ? '' : styles.nativeSticky(offset)
|
|
13
13
|
}, children);
|
|
14
14
|
export default StickyToolbarWrapper;
|
|
@@ -29,6 +29,7 @@ type ConnectedRichTextProps = {
|
|
|
29
29
|
isDisabled?: boolean;
|
|
30
30
|
isToolbarHidden?: boolean;
|
|
31
31
|
actionsDisabled?: boolean;
|
|
32
|
+
stickyToolbarOffset?: number;
|
|
32
33
|
};
|
|
33
34
|
export declare const ConnectedRichTextEditor: (props: ConnectedRichTextProps) => React.JSX.Element;
|
|
34
35
|
declare const RichTextEditor: (props: RichTextProps) => React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
type StickyToolbarProps = {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
|
+
offset?: number;
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
};
|
|
6
|
-
declare const StickyToolbarWrapper: ({ isDisabled, children }: StickyToolbarProps) => React.JSX.Element;
|
|
7
|
+
declare const StickyToolbarWrapper: ({ isDisabled, offset, children }: StickyToolbarProps) => React.JSX.Element;
|
|
7
8
|
export default StickyToolbarWrapper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.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.29.0",
|
|
45
45
|
"@contentful/f36-tokens": "^4.0.5",
|
|
46
46
|
"@contentful/f36-utils": "^4.24.3",
|
|
47
|
-
"@contentful/field-editor-reference": "^5.31.
|
|
47
|
+
"@contentful/field-editor-reference": "^5.31.2",
|
|
48
48
|
"@contentful/field-editor-shared": "^1.8.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": "70980d4606762773174d9b8c3b5a1f06228839c4"
|
|
90
90
|
}
|