Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `blocks.append(type, data)` API method

See original GitHub issue

Issue Description

This method should allow to append (or insert) new Blocks programmatically


editor.blocks.append('paragraph', {text: 'Hello world'});

editor.blocks.insert(4, 'header', {text: 'Hello world'});

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

cjagannathcommented, Apr 11, 2019

@cjagannath please, describe the use case of that feature. How you would generate a block’s data structure? It is an internal logic of a plugin. And type is the variable that defined by plugins users.

I can’t see a good implementation of it, except hardcoding.

For my use case, I would like to offer a custom tools experience where all the tools are listed on the left. Users can pick any tool and add it to the editor. The screenshot below would give an idea. The default tools menu(+) would have a sub set of the tools.


As a user, I would know the list of plugins that I want to use. Some plugins will be built by me for my specific case. So I know all their types and data structure. The API would make it very easy to pick and add tools.

If one has to think as an author, I agree it’s hard coding the plug-in info. That’s why in my request #717 I had asked about extending the tools menu UI. But that could become too complex.

Hope I am clear. Let me know if any more info is required.

Thank you for listening.

gohaberegcommented, Jul 1, 2019

Resolved by #826

Read more comments on GitHub >

github_iconTop Results From Across the Web

Append Block (REST API) - Azure Storage | Microsoft Learn
The Append Block operation commits a new block of data to the end of an existing append blob.
Read more >
Create and manage append blobs with PowerShell - 4sysops
Creating an append blob using PowerShell; Adding data to an append blob; Conclusion. Block blobs: This type of blob can have 50,000 blocks....
Read more >
.append() | jQuery API Documentation
A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at the end of each element in...
Read more >
How to append a HTML block to the existing ... - Stack Overflow
its very simple. you can use the Appendto method. Give Class to Each of your div and use $( ".classA" ).appendTo( ".classB" );....
Read more >
Python's .append(): Add Items to Your Lists in Place
Every time you call .append() on an existing list, the method adds a new item ... different data types and Python objects, so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found