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

Select and Convert multiple blocks to one block💡 #1617

Open
evanjmg opened this issue Mar 30, 2021 · 7 comments · May be fixed by #1620
Open

Select and Convert multiple blocks to one block💡 #1617

evanjmg opened this issue Mar 30, 2021 · 7 comments · May be fixed by #1620

Comments

@evanjmg
Copy link

evanjmg commented Mar 30, 2021

Feature: I have a bunch paragraphs I'd like to arrange into a list.

Behaviour: Select multiple blocks, click, and the conversion tool appears and I can make a conversion into one block. Conversion config would need to have a new field on how to merge multiple blocks.

Are there any alternatives?
It's very tedious to create and modify lists from existing content. The only alternative is to backspace all paragraphs into one paragraph and then convert to list - which isn't intuitive.

@evanjmg
Copy link
Author

evanjmg commented Mar 30, 2021

I'll try to create a pr on this soon.

@evanjmg evanjmg linked a pull request Mar 31, 2021 that will close this issue
@evanjmg
Copy link
Author

evanjmg commented Mar 31, 2021

^ PR above, let me know if you have any feedback

@evanjmg
Copy link
Author

evanjmg commented Mar 31, 2021

Additional configuration will be added to header and nested list libraries:

// list mergeImport
   mergeImport: (arr: string[]) => {
        return {
          items: arr.map((content) => {
            return {
              content,
              items: [],
            };
          }),
        };
      }
// header mergeImport 
 mergeImport: (data: string[], blocks) => {
        const { level } = blocks[0];
        const text = data.join(' ');
        const hasSameHeading = level && blocks.every((block) => level === block.level);
        if (hasSameHeading) {
          return {
            text,
            level,
          };
        }

        return {
          text,
        };
      },

@zizther
Copy link

zizther commented Apr 4, 2021

Nice feature, and something I am after.

@hcherchi
Copy link

This is one of the biggest thing that's missing in this Editor. Thanks for opening this!

@gohabereg gohabereg added this to Needs triage in Issues triage Mar 21, 2022
@camya
Copy link

camya commented Oct 10, 2022

Hi, this is also the biggest thing I'm missing in EditorJS.

Is there any update on this feature?

@neSpecc neSpecc removed the feature label Jan 28, 2023
@jackcooke
Copy link

This feature is needed I'm sure by many! Any update on this in future releases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Issues triage
Needs triage
Development

Successfully merging a pull request may close this issue.

6 participants