textbox

Hierarchy: presentation > slides > shapes

A textbox is a type of shape which is used to display text.

Parameter
Type
Input
Description

name

String

[required if shapeId not provided] Name of shape to update/manipulate. Find shape names here.

shapeId

int

[required if name not provided] A unique identifier of a given shape. This ID is not displayed in the document, it's hidden in the xml.

text

String or Object

[optional] Text to display in the textbox:

- String: A simple way to display plain text in the textbox.

- Object: Use for advanced formatting by defining text chunks. See text object for more information.

settings

Object

[optional] An array of shape-level settings. See settings object for more information.

is_hidden

Boolean

true, false

[optional] Hide shape

remove

Boolean

true, false

[optional] Delete shape

JSON payload

"shapes": [
  {
    "name": "string",
    "text": "string",
    "settings": [],
    "is_hidden": boolean,
    "remove": boolean
   },
  {
    "name": "string",
    "text": [],
    "settings": [],
    "is_hidden": boolean,
    "remove": boolean
   } 
]

`text` Object

An array of text objects, where each object represents a part of the text with its own text content and optional properties.

Parameter
Type
Input
Description

text_run

String

[required] Text chunk

text_properties

Object

[optional] A text styling object. List of font styling parameters to override existing styles for the given chunk of text.

JSON Payload


`text_properties` Object

Text format properties.

Parameter
Type
Input
Description

font_type

String

MS supported font names

[optional] Font name

font_size

Integer

1 to 4000

[optional] Font size

font_bold

Boolean

true, false

[optional] Bold

font_italic

Boolean

true, false

[optional] Italic

font_color

String

Color name,

RGB(0,0,0),

Hex

[optional] Set text color

font_bg_color

String

Color name,

RGB(0,0,0),

Hex

[optional] Set text background color

text_indent

Integer

0 to 142.24

[optional] Set text indent

text_align

String (Enum)

left,

center,

right,

justified,

dist

[optional] Set text alignment

font_underline

String (Enum)

single,

double,

heavy,

dotted,

heavydotted,

dashed,

heavydashed,

heavylongdashed,

dotdash,

heavydotdash,

heavydotdotdash,

wavy,

heavywavy,

doublewavy

[optional] Various text underline

text_line_spacing

Float,

Integer

1.00-9.99

[optional] Set spacing above and within a paragraph. Line Spacing option is set to Multiple. A value of 1 would equal single-spacing, while a value of 3 would equal triple-spacing

bullet

Boolean

true; false

[optional] Enable bullet point

bullet_type

String (Enum)

Symbol or Number

[optional] Use symbols or numbers

bullet_font_name

String

MS supported font names

[optional] Set bullet font type

bullet_character_code

Integer

0-50000

[optional] Set bullet symbol

bullet_color

String

Color name,

RGB(0,0,0),

Hex

[optional] Set bullet color

bullet_size

Integer

0-5000

[optional] Set bullet size relative to text

bullet_indent_level

Integer

0-100

[optional] Set gap between bullet point and text. Tab based indent

bullet_indent

Integer,

Float

0-142.24

[optional] Set gap between bullet point and text. Unit is `cm` by default.

new_line

Boolean

true; false

[optional] Appends a line break and creates a new paragraph


`settings` Object

These settings are applied at shape level.

Parameter
Type
Input
Description

height

Integer,

Float

0 to 5963.92

[optional] Set shape height

width

Integer,

Float

0 to 5963.92

optional] Set shape width

left

Integer,

Float

-5963.92 to 5963.92

[optional] Set left position

top

Integer,

Float

-5963.92 to 5963.92

[optional] Set top position

unit

String (Enum)

cm,

pt,

points

[optional] Set unit of measurement for shape width, height, left, top.(default value if ‘unit’ field is not specified)

fill_color

String

Color name,

RGB(0,0,0),

Hex

[optional] Set shape background color

font_type

String

MS supported font names

[optional] Font type

font_size

Integer

1 to 4000

[optional] Font size

font_bold

Boolean

true; false

[optional] Bold

font_italic

Boolean

true; false

[optional] Italic

font_color

String

Color name,

RGB(0,0,0),

Hex

[optional] Set text color

font_bg_color

String

Color name,

RGB(0,0,0),

Hex

[optional] Set text background color

text_indent

Integer

0 to 142.24

[optional] Set text indent

font_underline

String (Enum)

single,

double,

heavy,

dotted,

heavydotted,

dashed,

heavydashed,

heavylongdashed,

dotdash,

heavydotdash,

heavydotdotdash,

wavy,

heavywavy,

doublewavy

[optional] Various text underline

text_align

String (Enum)

left,

center,

right,

justified,

dist

[optional] Set text alignment

text_line_spacing

Integer

1.00-9.99

[optional] Set spacing above and within a paragraph. Line Spacing option is set to Multiple. A value of 1 would equal single-spacing, while a value of 3 would equal triple-spacing

vertical_anchor

String (Enum)

top, middle, bottom

[optional] Set vertical text alignment

new_line

Boolean

true; false

[optional] Appends a line break and creates a new paragraph

JSON payload

Last updated

Was this helpful?