Git Product home page Git Product logo

Comments (4)

HarryChen0506 avatar HarryChen0506 commented on July 18, 2024 2

本库提供了自定义图片上传的接口onCustomImageUpload。如果需要有定制需求,可以利用这个接口做二次开发。由于考虑大多数使用者喜好不一,故不做两种形式的上传方式。自定义的大致思路已在文档里演示了。

onCustomImageUpload = () => {
    return new Promise((resolve, reject) => {
      // 对话框伪代码
      YourCustomDialog.open(() => {
        setTimeout((url) => {
            // 对话框正确的回调获取到url, 无论是本地上传的,还是直接输入的
             resolve({url: url, name: 'pic'})
           }, 1000)
       })
    })
  }

from react-markdown-editor-lite.

HarryChen0506 avatar HarryChen0506 commented on July 18, 2024 1

这个需要自己做二次开发的,接口提供给你了,你要再写个对话框来支持这两种上传方式。

from react-markdown-editor-lite.

deligent-ant avatar deligent-ant commented on July 18, 2024

那个并不行啊 也没说做两种形式的上传啊,用户有时候点击 图片按钮 并不想上传图片,不过是想 生成![]() 这个语法而已 你连这个都不支持,都给你网址了 那个不是2种形式的上传 那用户点击图片按钮 不想上传图片怎么班 只是想生成格式好的语法

from react-markdown-editor-lite.

deligent-ant avatar deligent-ant commented on July 18, 2024

一个 下拉框就能做的交互 那才是最合理的 如果是对话框 会打断用户操作的感觉,体验很不好。就比如 你已经明确知道要不想选择图片,还要等对话框弹出来 再操作 这对用户体验是非常不友好的。既然作者不支持 ,那也没有办法了 再看看有没有更好的库了 再次对作者表示感谢

from react-markdown-editor-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.