feat: Add the ability to paste images to editor (#10072)

This commit is contained in:
Muhsin Keloth
2024-09-11 09:44:13 +05:30
committed by GitHub
parent bb74c621b5
commit 2c17c95eab
8 changed files with 160 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
import articlesAPI from 'dashboard/api/helpCenter/articles';
import { uploadFile } from 'dashboard/helper/uploadHelper';
import { uploadExternalImage, uploadFile } from 'dashboard/helper/uploadHelper';
import { throwErrorMessage } from 'dashboard/store/utils/api';
import types from '../../mutation-types';
@@ -132,6 +132,11 @@ export const actions = {
return fileUrl;
},
uploadExternalImage: async (_, { url }) => {
const { fileUrl } = await uploadExternalImage(url);
return fileUrl;
},
reorder: async (_, { portalSlug, categorySlug, reorderedGroup }) => {
try {
await articlesAPI.reorderArticles({