View all expressions
Transformation

Convert Spaces into Line Breaks in Text Layers

Replaces all spaces in a text layer with line breaks.

Contributed by:


text.sourceText.replace(/ /g, "\r");

Convert Spaces into Line Breaks in Text Layers

Practical use case

Helps format text dynamically, ensuring line breaks happen after every space - great for captions and paragraph formatting.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image