* Returns the index of Block by id; * * @param id - block id
(id: string)
| 65 | * @param id - block id |
| 66 | */ |
| 67 | public getBlockIndex(id: string): number | undefined { |
| 68 | const block = this.Editor.BlockManager.getBlockById(id); |
| 69 | |
| 70 | if (!block) { |
| 71 | _.logLabeled('There is no block with id `' + id + '`', 'warn'); |
| 72 | |
| 73 | return; |
| 74 | } |
| 75 | |
| 76 | return this.Editor.BlockManager.getBlockIndex(block); |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Returns BlockAPI object by Block index |
no test coverage detected