Comments (4)
this is my image tool config in Editor js
image: {
class: ImageTool,
config: {
uploader: {
async uploadByFile(file: File) {
console.log("uploading");
// upload to uploadthing
const res = await uploadFiles({
files: [file],
endpoint: "imageUploader",
});
return {
success: 1,
file: { url: res[0].fileUrl },
};
},
},
},
},
from image.
uploadByFile
is a key with your function as its value.
try this:
image: {
...
uploader: {
uploadByFile: async (file: File) => {...}
}
...
}
from image.
please help me with that it really hurts!
from image.
@xanderjakeq
thanks mate! it worked.
from image.
Related Issues (20)
- Some incomplete code after the comment in 2.8.1 ?
- disable createFileButton being fired onload HOT 1
- Cannot assign to read only property 'caption' HOT 3
- CDN example
- SVG Icon Disappears When Using buttonContent in ImageTool Configuration
- Canβt un streatch once stretched HOT 1
- Redirected images cannot be displayed
- Option to remove caption and extra features (border, stretch, etc.) HOT 2
- Option to add more options for image upload
- Add images without backend
- Dragging an existing image duplicates it
- Copying Images from Word or Google Doc
- Warning: `appendCallback` hook is deprecated
- Add link to image (make image a clickable link) HOT 1
- The onChange function is not being triggered when the caption of image is made blank.
- Pasting a picture from the clipboard after pasting a picture URL from the clipboard HOT 1
- How to pass temporary url
- Picture being pasted twice HOT 1
- {success: 0} not working!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image.