Skip to main content

Home > blockly > Block > toString

Block.toString() method

Create a human-readable text representation of this block and any children.

Signature:

toString(opt_maxLength?: number, opt_emptyToken?: string): string;

Parameters

ParameterTypeDescription
opt_maxLengthnumber(Optional) Truncate the string to this length.
opt_emptyTokenstring(Optional) The placeholder string used to denote an empty input. If not specified, '?' is used.

Returns:

string

Text of block.