NarraLeaf

Text

Reading and writing the content, typography and effects of a wired nl.text element, and the value of a wired nl.textInput.

nl.text and nl.textInput are different widgets that share three node names between them. Both families sit here so that collision is visible in one place; the rules common to every Element node are in Element.

Text

Text nodes carry an element:nl.text pin, so the palette offers them only once the graph binds an nl.text element. The Self forms are in Text.

Get Text

blueprint.element.text.getText · Pure

Reads the element's current text content.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textout · datastring

Set Text

blueprint.element.text.setText · Latent

Replaces the text content.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
textin · datastringAccepts an on-card literal.

Append Text

blueprint.element.text.appendText · Latent

Concatenates onto the end of the current text.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
textin · datastringAccepts an on-card literal.

Clear Text

blueprint.element.text.clearText · Latent

Sets the text to the empty string.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text

Get Font

blueprint.element.text.getFont · Pure

Reads the font asset id in use.

PinDirectionTypeNotes
elementin · dataelement:nl.text
fontAssetIdout · datastring

Set Font

blueprint.element.text.setFont · Latent

Sets the font asset id. An empty string clears the font back to the default.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
fontAssetIdin · datastringAccepts an on-card literal.

Get Font Size

blueprint.element.text.getFontSize · Pure

Reads the font size.

PinDirectionTypeNotes
elementin · dataelement:nl.text
fontSizeout · datafloat

Set Font Size

blueprint.element.text.setFontSize · Latent

Sets the font size. Values below 1 are raised to 1.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
fontSizein · datafloatAccepts an on-card literal.

Get Font Weight

blueprint.element.text.getFontWeight · Pure

Reads the font weight.

PinDirectionTypeNotes
elementin · dataelement:nl.text
fontWeightout · datastring

Set Font Weight

blueprint.element.text.setFontWeight · Latent

Sets the font weight: normal, 600 or bold. Anything else leaves the current value alone.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
fontWeightin · datastringAccepts an on-card literal.

Get Text Color

blueprint.element.text.getTextColor · Pure

Reads the text colour.

PinDirectionTypeNotes
elementin · dataelement:nl.text
colorout · dataRGBAColor

Set Text Color

blueprint.element.text.setTextColor · Latent

Sets the text colour.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
colorin · dataRGBAColor

Get Text Align

blueprint.element.text.getTextAlign · Pure

Reads the horizontal alignment.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textAlignout · datastring

Set Text Align

blueprint.element.text.setTextAlign · Latent

Sets the horizontal alignment: left, center or right.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
textAlignin · datastringAccepts an on-card literal.

Get Text Vertical Align

blueprint.element.text.getTextVerticalAlign · Pure

Reads the vertical alignment.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textVerticalAlignout · datastring

Set Text Vertical Align

blueprint.element.text.setTextVerticalAlign · Latent

Sets the vertical alignment: start, center or end.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
textVerticalAlignin · datastringAccepts an on-card literal.

Get Line Height

blueprint.element.text.getLineHeight · Pure

Reads the line height.

PinDirectionTypeNotes
elementin · dataelement:nl.text
lineHeightout · datafloat

Set Line Height

blueprint.element.text.setLineHeight · Latent

Sets the line height. Values below 0.1 are raised to 0.1.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
lineHeightin · datafloatAccepts an on-card literal.

Get Wrap Mode

blueprint.element.text.getWrapMode · Pure

Reads the wrap mode.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textWrapModeout · datastring

Set Wrap Mode

blueprint.element.text.setWrapMode · Latent

Sets the wrap mode: word, character or nowrap.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
textWrapModein · datastringAccepts an on-card literal.

Get Effects

blueprint.element.text.getEffects · Pure

Reads the static text effects as json.

PinDirectionTypeNotes
elementin · dataelement:nl.text
effectsout · datajson

Set Effects

blueprint.element.text.setEffects · Latent

Writes the static text effects.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
effectsin · datajson

Get All Properties

blueprint.element.text.getAllProperties · Pure

Ten outputs from one read, for when you want the whole text state without ten nodes.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textout · datastring
fontAssetIdout · datastring
fontSizeout · datafloat
fontWeightout · datastring
colorout · dataRGBAColor
textAlignout · datastring
textVerticalAlignout · datastring
lineHeightout · datafloat
textWrapModeout · datastring
effectsout · datajson

Set All Properties

blueprint.element.text.setAllProperties · Latent

Writes all ten in one call. Every input falls back to the element's current value when it resolves to nothing, so driving only the two you care about is safe.

PinDirectionTypeNotes
inin · exec
nextout · exec
elementin · dataelement:nl.text
textin · datastringAccepts an on-card literal.
fontAssetIdin · datastringAccepts an on-card literal.
fontSizein · datafloatAccepts an on-card literal.
fontWeightin · datastringAccepts an on-card literal.
colorin · dataRGBAColor
textAlignin · datastringAccepts an on-card literal.
textVerticalAlignin · datastringAccepts an on-card literal.
lineHeightin · datafloatAccepts an on-card literal.
textWrapModein · datastringAccepts an on-card literal.
effectsin · datajson

Text Input

These target nl.textInput, not nl.text, and their palette names collide head-on with the Text nodes above: two entries called Get Text, two called Set Text, two called Clear Text. The pin is what tells them apart — a Text Input node takes textInput typed element:nl.textInput, a Text node takes element typed element:nl.text — and in practice you only ever see one of each pair, because the palette offers whichever matches the binding your graph already holds. The Self forms are in Text Input.

Get Text

blueprint.element.textInput.getValue · Pure

Reads the field's current value and its length. length is declared float, not integer.

PinDirectionTypeNotes
textInputin · dataelement:nl.textInput
valueout · datastring
lengthout · datafloat

Set Text

blueprint.element.textInput.setValue · Latent

Replaces the field's value.

PinDirectionTypeNotes
inin · exec
nextout · exec
textInputin · dataelement:nl.textInput
valuein · datastringAccepts an on-card literal.

Clear Text

blueprint.element.textInput.clear · Latent

Sets the field's value to the empty string.

PinDirectionTypeNotes
inin · exec
nextout · exec
textInputin · dataelement:nl.textInput

On this page