Darginec05 / Yoopta-Editor

Build Notion-like, Craft-like, Coda-like, Medium-like editors with Yoopta
https://yoopta.dev/
MIT License
1.12k stars 88 forks source link

Multiple image upload #27

Open YolCruz opened 1 year ago

YolCruz commented 1 year ago

Is your feature request related to a problem? Please describe. I'm interested in using a Notion-like editor in my website. So far, Yopage looks really awesome. However, in my requirements, I need to be able to upload multiple images at the same time when I click the image option. Is there a plan to support such a feature in the future?

Describe the solution you'd like To be able to select multiple images in the system browser, and that each one of them is added one after the other in the editor

Describe alternatives you've considered So far I've tried other editors like Editor.js but they also don't provide this feature

Darginec05 commented 1 year ago

Hi @YolCruz. I'll have Image component by default. And this Image will contain functionality for resize image, adding external link etc., but not multiple image.

But in the yopta-editor@v2 I'll provide extend function for each component. So, any component like Image will be easy configured using extend function to override default behaviour Image component and you can ease add multi image.

Example of usage:


  <YoptaEditor
        value={editorValue}
        onChange={(val: Descendant[]) => setEditorValue(val)}
        components={[
          Paragraph,
          Blockquote,
          Callout,
          Code,
          Link,
          Lists.NumberedList,
          Lists.BulletedList,
          Lists.TodoList,
          Headings.HeadingOne,
          Headings.HeadingTwo,
          Headings.HeadingThree,
          Image.extend({
            renderer: (editor) => (props) => <MyEnhancedImageComponent {...props} />,
          }),
          Video,
        ]}
      />```
Darginec05 commented 1 year ago

Stand by. Version 2 is ready for release

And your issue will be fixed of course :blush:

maZahaca commented 5 months ago

@Darginec05 I wonder if this issue was fixed under the latest v4 or needs to stay?