@pie-lib/editable-html-tip-tap 1.0.0 → 1.0.1
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/lib/extensions/component.js +10 -2
- package/lib/index.js +402 -145
- package/package.json +2 -2
- package/src/extensions/component.jsx +11 -3
- package/src/index.jsx +349 -400
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/editable-html-tip-tap",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@pie-lib/drag": "^2.22.1",
|
|
14
14
|
"@pie-lib/math-input": "^6.31.1",
|
|
15
15
|
"@pie-lib/math-rendering": "^3.22.1",
|
|
16
|
-
"@pie-lib/math-toolbar": "
|
|
16
|
+
"@pie-lib/math-toolbar": "1.31.2-beta.1",
|
|
17
17
|
"@pie-lib/render-ui": "^4.35.1",
|
|
18
18
|
"@tiptap/core": "3.0.9",
|
|
19
19
|
"@tiptap/extension-color": "3.0.9",
|
|
@@ -8,7 +8,7 @@ import { withStyles } from '@material-ui/core/styles';
|
|
|
8
8
|
import { NodeViewWrapper } from '@tiptap/react';
|
|
9
9
|
import InsertImageHandler from '../plugins/image/insert-image-handler';
|
|
10
10
|
import ImageToolbar from '../plugins/image/image-toolbar';
|
|
11
|
-
import CustomToolbarWrapper from
|
|
11
|
+
import CustomToolbarWrapper from './custom-toolbar-wrapper';
|
|
12
12
|
|
|
13
13
|
const log = debug('@pie-lib:editable-html:plugins:image:component');
|
|
14
14
|
|
|
@@ -196,10 +196,18 @@ function ImageComponent(props) {
|
|
|
196
196
|
background: 'var(--editable-html-toolbar-bg, #efefef)',
|
|
197
197
|
boxShadow:
|
|
198
198
|
'0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',
|
|
199
|
-
width: '100%'
|
|
199
|
+
width: '100%',
|
|
200
200
|
}}
|
|
201
201
|
>
|
|
202
|
-
<CustomToolbarWrapper
|
|
202
|
+
<CustomToolbarWrapper
|
|
203
|
+
showDone
|
|
204
|
+
{...options}
|
|
205
|
+
onDone={() => {
|
|
206
|
+
setShowToolbar(false);
|
|
207
|
+
props.imageHandling?.onDone();
|
|
208
|
+
props.editor.commands.focus('end');
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
203
211
|
<ImageToolbar
|
|
204
212
|
disableImageAlignmentButtons={options.disableImageAlignmentButtons}
|
|
205
213
|
alt={node.attrs.alt}
|