MCPcopy Index your code
hub / github.com/codex-team/editor.js / getBlockIndex

Method getBlockIndex

src/components/modules/blockManager.ts:668–670  ·  view source on GitHub ↗

* Returns an index for passed Block * * @param block - block to find index

(block: Block)

Source from the content-addressed store, hash-verified

666 * @param block - block to find index
667 */
668 public getBlockIndex(block: Block): number {
669 return this._blocks.indexOf(block);
670 }
671
672 /**
673 * Returns the Block by passed id

Callers 4

currentBlockMethod · 0.95
updateMethod · 0.95
replaceMethod · 0.95
bindBlockEventsMethod · 0.95

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected