getAllBlocks ``EDITOR`` ======================= `getAllBlocks` API extracts the content from the INK Editor in the blocks format. It provides meta data for each block including it's current value, path, key, children nodes, etc. Syntax ++++++ .. code-block:: javascript getAllBlocks() : Promise<[Object]> Example +++++++ .. code-block:: javascript :linenos: import INKAPI from './inkapi.js' INKAPI.ready(async () => { const EDITOR = INKAPI.editor; EDITOR.getAllBlocks().then(blocks => { console.log(blocks); }) //Or use async/await const blocks = await EDITOR.getAllBlocks(); console.log(blocks); /* Console Output: [ { "type": "heading-one", "align": "left", "children": [ ... ], "key": 58, "path": [0], "text": "My Title", "isBlock": true }, { "type": "paragraph", "align": "left", "children": [ ... ], "key": 59, "path": [1], "text": "My content here!...", "isBlock": true } ] */ }); .. note:: Learn more about how blocks work in INK editor `here <../../advanced/INK-Editor-Blocks-Architecture.html>`_.