@kolkov/angular-editor 图片上传使用指南

@kolkov/angular-editor images upload Usage Guide

我可以将 Kolkov editor 放在我的 html 页面上,但它不会在编辑器上附加图像,尽管它确实将文件上传到提到的 url 并且我可以看到响应参数从具有 url 的服务器访问上传的文件。

有可用的教程将其作为组件集成到 angular 项目中,但找不到有关如何处理图像的任何内容。

如果有这方面的指点,请帮忙

它在上传 REST API 时使用 "file" 参数上传图像。 所以,在 html

 <app-ngx-editor height="500px" minHeight="500px" [placeholder]="'Enter text here...'" 
[spellcheck]="true"  [(ngModel)]="htmlContent" imageEndPoint="https://localhost:8500/upload">
      </app-ngx-editor>

在 REST 方面,

@PostMapping(path="/upload", produces = "application/json")
    @ResponseBody
    public Map FileUpload(@RequestParam("file") MultipartFile file, Model model) { 

        Map<String,String> values = new HashMap<String,String>();
        storageService.store(file);
        values.put("url", "http://localhost:8500/files/"+file.getOriginalFilename());
        return values;
    }