Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/fieldtypes/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The Textarea is a simple free-form writing space where you can enter text or HTM

![textarea field](_images/field_textarea.png)

[TOC=2]

## Field Settings

### Textarea Row Height
Expand All @@ -34,3 +36,21 @@ Either left-to-right, or right-to-left.
### Field Tools

Show formatting buttons to make writing markup easier, show a smiley chooser, or show a file chooser button to easily insert images or links to files.

## Parsing File Tags

The Textarea fieldtype supports the use of file tags in the format `{file:XX:field}` where `XX` is the file ID and `field` is any field associated with that file, such as `url`, `filename`, `title`, etc.

When the content of a Textarea field is parsed for display, these tags will be replaced with the corresponding values from the file model.

For example, if you have a file with ID `5`, and you want to insert its URL into the Textarea content, you would use the tag `{file:5:url}`. When the content is rendered, this tag will be replaced with the actual URL of the file.

The supported fields for file tags include:
- `url`: The absolute URL to the file.
- `file_name`: The name of the file.
- `title`: The title of the file.
- `description`: The description of the file.
- `file_size`: The size of the file in bytes.
- `mime_type`: The MIME type of the file.
- `location`: Where the photo was taken
- `credits`: Photo credits