Question
How to get the index of the block in plugin?
Context
I am using Editor JS to implement a custom editor. Based on some logic, I highlight a block matching to criteria. While doing this, I realised that there is no way to know the index of the block. Note that the block is not selected or focused. Is there any way to get index of the block in the plugin. I see there are various methods like getblockbyindex, getblockscount etc, but there is no method for getBlockIndex(block).
Comments
The BlockManager has a method to get the block index, but it is not exposed to plugin via blocks API.
Question
How to get the index of the block in plugin?
Context
I am using Editor JS to implement a custom editor. Based on some logic, I highlight a block matching to criteria. While doing this, I realised that there is no way to know the index of the block. Note that the block is not selected or focused. Is there any way to get index of the block in the plugin. I see there are various methods like getblockbyindex, getblockscount etc, but there is no method for getBlockIndex(block).
Comments
The BlockManager has a method to get the block index, but it is not exposed to plugin via blocks API.