A text asset can contain large amounts of textual data.
You can work with its text content in a configurator (unlike the contents of a file asset).
As such, it's useful as a container for e.g. HTML print templates or SVG images (if you want to process them as text).
How to create a text asset
You have two options to create a text asset: you can either create an empty text asset or upload a text file.
Create empty text asset
Click on the (+) button to create a new empty text asset
Select a name, folder, format and click on
Upload existing text file
Upload Filesto upload one or more text files.
Textasset type. Keep in mind, a text file can also be uploaded as file asset.
Change text content
After creating or uploading a text asset, it is possible to change its content. Similar to other assets, you can also rename, copy, move and delete a text asset.
How to use a text asset
A text asset can be used in the configurator. For this, initially assign the asset bundle which contains your text asset to your configurator as described here.
Keep in mind that retrieving text content requires time.
This means, loading a large number of texts can slow down your configurator – so only use what you really need.
You can get the URL of the text content in the configurator with the following hive rule:
Retrieve the content of a text asset in the configurator with the following hive rule:
Currently, text assets support the file formats listed below.
The asset editor provides appropriate syntax highlighting and error notifications for them.
If you create an empty text asset, the format must be explicitly defined. If you upload a text file, the format is detected based on its file extension.
Note that the format cannot be changed in a subsequent step.
For this, please re-upload the file with the desired file extension or create an empty text asset.
The format has no significant impact for the usage in the configurator.
The content of a text assest will always be a text in hive.