This page is under construction.
This page describes
RichTextArray
and its comprehension RichTextObject
. First, prepare with the following code.↑ Table of Contents
1. RichTextArray
1.1 how to create
In NotionRubyMapping, users do not directly create a RichTextArray. RichTextArray.rich_text_array is called internally when setting text in a block or property. The following script creates a To Do block with a plain text.
example code and the result
A single text
In the constructor of ToDoBlock(
TodoBlock.new(text_info)
), the RichTextArray creates by the following script. The first argument of rich_text_array
is a keyword for creating JSON. These keywords (rich_text
, caption
, and so on) are determined by the location where the RichTextArray is used, so they are set automatically by the library.text_info
can be used the following five patterns.- A single text
- An array of texts