Templates
Last updated
Was this helpful?
Last updated
Was this helpful?
Templates can be used to create shortcuts or presets for multiple tags. You define a new tag that gets replaced by some other tags before the text is processed by the animated text element.
The replacement is done in a pre-processing step via string replacement. It's simple but powerful.
Let's start with a template like this:
Tag
angry
Opening Tag
<b><color="red"><shake>
Closing Tag
</shake></color></b>
If you use the tag like this:
Hey, I'm a <angry>very angry</angry> character! I bet you're <wiggle>scared</wiggle>.
The <angry>
and </angry>
tags will be replaced like this:
Hey, I'm a <b><color="red"><shake>very angry</shake></color></b> character! I bet you're <wiggle>scared</wiggle>.
Very intimidating. Since it's just string replacement, you can add any tags you want. Rich text tags, built-in animation tags, custom animations, etc.
If you want to go crazy, you could even include template tags inside other style tags, but it will only work with some extra care: Each style is only replaced once. They get executed sequentially. That means if your first style contains a tag for your second style, the replaced tags will get replaced too, but it won't work the other way around.