Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputRichText 富文本编辑器上传图片receiver没有执行请求适配器和返回适配器 #10204

Closed
hsg4ok opened this issue May 10, 2024 · 3 comments
Assignees

Comments

@hsg4ok
Copy link

hsg4ok commented May 10, 2024

描述问题:

InputRichText 富文本编辑器上传图片receiver没有执行请求适配器和返回适配器

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的?
    npm

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    3.5.2

@2betop
Copy link
Collaborator

2betop commented May 10, 2024

不能复现,请求适配器和返回适配器都可执行了

{
  "type": "page",
  "body": {
    "type": "form",
    "body": [
      {
        "type": "input-rich-text",
        "receiver": {
          "method": "post",
          "requestAdaptor": "debugger;",
          "adaptor": "debugger;console.log(context); // 打印上下文数据 \nreturn {\n    ...payload,\n    status: payload.code === 200 ? 0 : payload.code\n}",
          "url": "/api/mock2/sample/mirror?json={%22link%22:%22/amis/static/logo_c812f54.png%22}"
        },
        "name": "rich",
        "label": "Rich Text"
      }
    ]
  }
}

请贴一下你的配置,如果用的是 frolaEditor 那个确实是执行不进行,因为它是通过传入 api 来实现的,不是外部做的 ajax 请求

@2betop 2betop self-assigned this May 10, 2024
@hsg4ok
Copy link
Author

hsg4ok commented May 14, 2024

感谢回复,我测试的确实是froala,使用tinymce插入图片和表格时,会将浏览器卡崩溃。控制台也没有出现报错,貌似是执行了某个死循环。和这位朋友的提交issues类似:#9317

@2betop
Copy link
Collaborator

2betop commented May 14, 2024

froala 没有暴露相关钩子,无法执行进去

@2betop 2betop closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants