mjml4 support moved to a separate package
support for file handling in grapesjs
This commit is contained in:
parent
9f467762c0
commit
b089993360
15 changed files with 136 additions and 10242 deletions
|
@ -24,7 +24,7 @@ users.registerRestrictedAccessTokenMethod('grapesjs', async ({entityTypeId, enti
|
|||
return {
|
||||
permissions: {
|
||||
'template': {
|
||||
[entityId]: new Set(['manageFiles', 'view'])
|
||||
[entityId]: new Set(['viewFiles', 'manageFiles', 'view'])
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -51,6 +51,13 @@ function getRouter(appType) {
|
|||
publicPath: getSandboxUrl()
|
||||
});
|
||||
});
|
||||
|
||||
fileHelpers.installUploadHandler(router, '/upload/:type/:entityId', files.ReplacementBehavior.RENAME, null, 'file', resp => {
|
||||
return {
|
||||
data: resp.files.map( f => ({type: 'image', src: f.url}) )
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue