@bigbinary/neeto-editor 0.1.15 → 0.1.16
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/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import "@uppy/core/dist/style.css";
|
|
|
7
7
|
import "@uppy/dashboard/dist/style.css";
|
|
8
8
|
import sharedState from "../../sharedState";
|
|
9
9
|
|
|
10
|
-
const ImageUpload = ({ editor }) => {
|
|
10
|
+
const ImageUpload = ({ editor, imageUploadUrl }) => {
|
|
11
11
|
const uppy = new Uppy({
|
|
12
12
|
allowMultipleUploads: false,
|
|
13
13
|
autoProceed: true,
|
|
@@ -15,7 +15,7 @@ const ImageUpload = ({ editor }) => {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
uppy.use(XHRUpload, {
|
|
18
|
-
endpoint: "/api/v1/direct_uploads",
|
|
18
|
+
endpoint: imageUploadUrl || "/api/v1/direct_uploads",
|
|
19
19
|
formData: true,
|
|
20
20
|
fieldName: "blob",
|
|
21
21
|
});
|
package/src/Editor/index.js
CHANGED
|
@@ -28,6 +28,7 @@ const Tiptap = (
|
|
|
28
28
|
"link",
|
|
29
29
|
],
|
|
30
30
|
className,
|
|
31
|
+
uploadEndpoint,
|
|
31
32
|
initialValue = "",
|
|
32
33
|
onChange = () => {},
|
|
33
34
|
...otherProps
|
|
@@ -77,7 +78,7 @@ const Tiptap = (
|
|
|
77
78
|
{!hideBubbleMenu && (
|
|
78
79
|
<BubbleMenu editor={editor} formatterOptions={formatterOptions} />
|
|
79
80
|
)}
|
|
80
|
-
<ImageUploader editor={editor} />
|
|
81
|
+
<ImageUploader editor={editor} imageUploadUrl={uploadEndpoint} />
|
|
81
82
|
<EditorContent editor={editor} />
|
|
82
83
|
</>
|
|
83
84
|
);
|