CRUD via block ID
See original GitHub issueHi,
First of all, I’d like to thank you for creating such a fantastic tool. It has been the core of my bachelor’s degree, and I’m profoundly thankful for that. Currently, I’ve decided to combine CRDT (YJs) with editor.js as my degree thesis, but I’m facing some blockers now.
As the title suggests, I’m interested in having the opportunity to perform CRUD operations based on ID. This is vital, as the ID is the key in the YMap data structure shared across various clients. So, on the update triggered remotely, I have to propagate this update to the editor.js instance and, specifically, swap the block content. This is not possible with the current Core API (Blocks manipulation). It exposes only the getById()
[#1667]. I reckon this might be in the nearest roadmap, as the creation, update, and deletion via ID will be the right step towards concurrent editing. Please let me know if this is feasible in the nearest future; I’m currently blocked, and I might have to consider alternatives.
By briefly analysing the codebase, most of the logic already has been implemented, and the Blocks Core API lacks the BlockManager.insert()
invocation with id (and replace boolean - ideally used to signify replacement by id and not by index) - for the creation (and update).
Alternatively, as I’m facing time constraints, maybe you could recognise a different (faster) approach, as my thesis is the POC, and time is of significant importance to me. Any ideas would be welcome.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:6 (2 by maintainers)
Top GitHub Comments
We have implemented our own selection-based collaborative cursor, but we have also modified a lot of editorjs source code, making it impossible to merge the latest version of editorjs.
@ChasLui Hi there! Would you share your fork of editor.js with collaboration support?