Manuals
Examples

<aside> 💡 This page was created for testing NorionRubyMapping. I thought this page was best suited to explain the append_child_block API, so I am presenting it as a use case.

</aside>

<aside> ℹ️ ↑ Table of Contents

</aside>

<aside> 💡 append_block_chidren can be used to Page and Blockobject. In this callout, there are some examples for appending blocks to block. examples for appending blocks to page are described under the callout.

Append block children for Block

Here is a paragraph block for test of append block children for a block. This block is obtained as org_block as follows. Moreover, a test sub_block object is generated by Block.new.paragraph method.

org_block = Block.find "82314687163e41baaf300a8a2bec57c2" # This callout block's id
sub_block = Block.new.paragraph "with children"

block = XXXBlock.new.(some arguments....) # create a block object
org_block.append_block_children block # call append_block_children API

From here, the code to create a block and its products are shown side by side. The each mention link of Block after “→” is the link to the method reference.


1. BookmarkBlock

block = BookmarkBlock.new "<https://www.google.com>", caption: "Google"

Google

↑ Table of Contents


2. BreadcrumbBlock

block = BreadcrumbBlock.new

↑ Table of Contents


3. BulletedListItemBlock

block = BulletedListItemBlock.new "Bullet list item", color: "green", sub_blocks: sub_block

↑ Table of Contents


4. CalloutBlock (emoji)

block = CalloutBlock.new "Emoji callout", emoji: "✅", color: "blue", sub_blocks: sub_block

<aside> ✅ Emoji callout

with children

</aside>

↑ Table of Contents


</aside>