CRUD via block ID #1684
CRUD via block ID #1684
Comments
You can fork and modify of source code, you need to implement
|
|
Understand. The Blocks ids is the new feature, so we haven't updated all the API methods for using id instead of indexes yet. But we need to do that. You can try to implement it and open a PR. |
|
How many time do you have? |
|
Thanks, @ChasLui and @neSpecc, for providing more context. I have been considering ProseMirror as an alternative, and comment from @ChasLui only cemented my decision. Unfortunately, even after implementing other methods, I'd still need to take care of cursors, which seems to require more effort than implementing methods that use block ID. I wish I could pick this ticket, but I've got only a few weeks left. Consequently, I won't be of any help in the nearest future. |
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. |



Hi,
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.
The text was updated successfully, but these errors were encountered: