↑ Table of Contents
TextObject is a subclass of
RichTextObject
.1. Singleton methods
text_object(value)
- [PARAM] value
- a text (String)
- existing TextObject
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.
2. Instance methods
bold=(flag) code=(flag) color=(color) italic=(flag) strikethrough=(flag) underline=(flag)
- [PARAM] flag
true if the
RichTextObject
is bold/code/italic/strikethrough/underline text
- [PARAM] color
color string for
color=
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=(str)
- [PARAM] str new text (String)
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>