如何在资产管理器中添加新上传的图像 - GrapesJS?

时间:2017-08-20 09:51:19

标签: php file-upload image-uploading

我已经使用php上传了图像,现在我如何在资产管理器中添加它 - GrapesJS? 请编写演示代码,而不是粘贴指向Assets API的链接

1 个答案:

答案 0 :(得分:0)

因此,ajax调用期望具有数据密钥内的资产的JSON:

{
  data: [
    'https://image/path',
    {type: 'image', src: 'https://image/path', height:350, width:250},
    ..
  ]
}