Skip to content

💡 Bulk insert #1860

@evanjmg

Description

@evanjmg
  1. Describe a problem.
    I have dozens of elements that need to be deleted then reinserted and replaced (i.e undo a particular section of document)
    elements.forEach((el, index) => {
    this.editor.blocks.insert(
    el.type,
    el.data,
    {},
    })
    Right now, the performance takes seconds for a render to reoccur after this insert.
  2. Describe the solution you'd like. Mockups are welcome.
    I'd like a insertMany([...], { startIndex: 10 }) option that would not have a significant performance improvement (hopefully).
  3. Are there any alternatives?
    Only way around this is doing less inserts - In my case I have a 1000 blocks in my document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions