<aside> đ Links (Object base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> âšī¸ â Table of Contents
</aside>
TextObject is a subclass of RichTextObject
.
to = TextObject.text_object "a text"
=> #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"a text"}, @text="a text", @type="text", @will_update=false>
to2 = TextObject.text_object to
=> #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"a text"}, @text="a text", @type="text", @will_update=false>
# to and to2 are equal objects.
code=(flag) color=(color) italic=(flag) strikethrough=(flag) underline=(flag)
RichTextObject
is bold/code/italic/strikethrough/underline textcolor=
bold=
, code=
, italic=
, strikethrough=
and underline=
set the correspond flag. color=
sets the object color.
property.bold = true
property.code = true
property.color = "default"
property.italic = true
property.strikethrough = true
property.underline = true
text=
sets str
to text and plain_text, and set will_update
flag to true.
to = TextObject.text_object "a text"
=> #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"a text"}, @text="a text", @type="text", @will_update=false>
to.text = "new text"
=> "new text"
=> #<NotionRubyMapping::TextObject:0x0000000105a82590 @options={"plain_text"=>"new text"}, @text="new text", @type="text", @will_update=true>