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

Method getBlockById

src/components/modules/blockManager.ts:678–680  ·  view source on GitHub ↗

* Returns the Block by passed id * * @param id - id of block to get * @returns {Block}

(id)

Source from the content-addressed store, hash-verified

676 * @returns {Block}
677 */
678 public getBlockById(id): Block | undefined {
679 return this._blocks.array.find(block => block.id === id);
680 }
681
682 /**
683 * Get Block instance by html element

Callers 5

makeToolboxMethod · 0.80
getBlockIndexMethod · 0.80
getByIdMethod · 0.80
BlocksAPIClass · 0.80
resolveBlockFunction · 0.80

Calls 1

findMethod · 0.80

Tested by

no test coverage detected