How to get the index of the block in plugin? #1980
Unanswered
carbonrider
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions