Closed Abhii5496 closed 7 months ago
const tool = { image: { class: Image, shortcut: 'CMD+I', config: { uploader: { async uploadByFile(file) { // console.log(file); const fileData = await FiletoBase64(file); // console.log(fileData); const res = await uploadImage({ image: fileData }); if (res.success === 1) { return res; } }, inlineToolbar: true, }, }, linkTool: { class: LinkTool, inlineToolbar: true,
config: { async endpoint(url): await axios.get(`/getMeta/${url_will_be_here_just like_image}`) }, },
}, }; ilke this or something
const tool = { image: { class: Image, shortcut: 'CMD+I', config: { uploader: { async uploadByFile(file) { // console.log(file); const fileData = await FiletoBase64(file); // console.log(fileData); const res = await uploadImage({ image: fileData }); if (res.success === 1) { return res; } }, inlineToolbar: true, }, }, linkTool: { class: LinkTool, inlineToolbar: true,
}, }; ilke this or something