editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

Insert Block method with existing block_id

Open osain-az opened this issue 3 years ago • 11 comments

Hello.

I was interested in being able to insert an existing with already block_id and keeping the existing blocki_id.

To achieve this, I add an id param to the existing insert method which allow user to pass in id if it exist.

To avoid breaking changes, the id is added as the last param in the method, meaning people already using this wont be affected

Use case

When working with multiple editors at the same time and there is a need to link all blocks to each editor and keeping the same ids in all across.

This is will be important when collaborating.

I have testing without passing the id and it works fine. i have tested much.

feel free to open an issue if you found any bug or breaking changes if this feature is accepted.

quick demo for live collaboration.

https://user-images.githubusercontent.com/25286366/146678762-18486371-3d4a-49a6-9427-e51bc2fa5482.mov

osain-az avatar Dec 19 '21 14:12 osain-az

@osain-az Hi, I'm looking for exactly this - have a real use case for this one to be merged. how can I help move it forward?

eyalcohen4 avatar Jan 13 '22 16:01 eyalcohen4

@osain-az Hi, I'm looking for exactly this - have a real use case for this one to be merged. how can I help move it forward?

Am not really sure, maybe @gohabereg and @khaydarov may know but it needs to be reviewed first

osain-az avatar Jan 13 '22 20:01 osain-az

@osain-az Hi, I'm looking for exactly this - have a real use case for this one to be merged. how can I help move it forward?

Am not really sure, maybe @gohabereg and @khaydarov may know but it needs to be reviewed first

Thanks! Appreciate the quick review and review fixes @neSpecc Lmk if there anything I can help with

eyalcohen4 avatar Jan 14 '22 08:01 eyalcohen4

Hi, any update here?

eyalcohen4 avatar Jan 18 '22 17:01 eyalcohen4

Hi is there any news ? I would really need this feature for my collaborative project how can i help ?

williamsbs avatar Feb 08 '22 17:02 williamsbs

Hey @neSpecc ! It could be really cool to insert a block from a given id issued by another instance of editorJs. This would allow me to implement collaborative features on my editorjs based application!

Thank you for everything you have done on EditorJs!

tristanlev avatar Feb 09 '22 09:02 tristanlev

Hi, Any estimation when this PR could be merged and released? We are considering using editor.js in our project for multi user collaboration and this is exactly what we are missing.

DomasB avatar May 17 '22 06:05 DomasB

@neSpecc, I will update it.

osain-az avatar May 22 '22 10:05 osain-az

Please, pull the next branch

neSpecc avatar Jun 28 '22 05:06 neSpecc

Pull done

osain-az avatar Jun 28 '22 22:06 osain-az

Hello @neSpecc any update yet

osain-az avatar Aug 09 '22 11:08 osain-az