Calls the visitor for every block in the tree, descending into children and into an infobox's rows. The path is the dotted path the API uses in errors[].path, such as blocks[0].children[1].
children
rows
errors[].path
blocks[0].children[1]
walk(document, (block, path) => { if (block.kind === 'image') console.log(path, block.url) }) Copy
walk(document, (block, path) => { if (block.kind === 'image') console.log(path, block.url) })
Calls the visitor for every block in the tree, descending into
childrenand into an infobox'srows. The path is the dotted path the API uses inerrors[].path, such asblocks[0].children[1].