Description
Replaces the text or a portion of the text in objects or XML tags.
The text to replace can be in selected text frames or can be in XML Tags in a selected object or in an object in a selected Super Group
To apply tags to objects, open the tags panel from the InDesign menu by going to Window > Utilities > Tags. Then create a new tag, hi-light the text to tag, and click on the tag name. For more on XML tags, see the topic article XML Tags.
When using the Map Tags to Variables option, you must insert the name of both the tags and the variables.
- Works On
- This action works on text in a selected text frames, or on text in XML tags in selected objects or in objects in selected Super Groups.
- Changes Selection
- This action does not change the selection.
Location
Examples
Replace Text inside XML Tags
This Replace Text action replaces the text inside an XML Tag in a selected object.
Action Setup
Action Results
Replace Text inside Multiple XML Tags
In this example, text from multiple variables are loaded into different XML tags. Tag names must be entered alongside variable names (which is different then some other actions which use mapping). Although the tags in this example are in the same text frame, text from tags can also be loaded from multiple selected frames.
Action Setup
Action Results
Parameters
Replace Text Type
- Replace Text Type Drop-down
- Provides different options for how to replace the text.
- Replace All Text – Replaces all of the text in the selected text frames with the specified string.
- Update XML Tag – Replaces all of the text in the specified XML tag within the selected text frames or the text frames within the selected Super Groups with the specified string. If there are multiple instances of the tag, all will be replaced.
- Replace Text – Replaces a specified string of text within the selected text frames or the text frames within the selected Super Groups. If there are multiple instances of the string, all will be replaced.
- Map Tags To Variables – Replaces all of the text in multiple specified XML tags within the selected text frames or text frames within the selected Super Groups with the value of variables as assigned to each XML tag individually.
Replace All Text Options
This set of options is only visible when the Replace All Text option is selected from the Replace Text Type drop-down.
- Replace Text With Field
- (string) The text to insert into the objects.
- Blank – Default. Clears the text from the object but does not insert any.
Update XML Tag Options
This set of options is only visible when the Update XML Tag option is selected from the Replace Text Type drop-down.
- XML Tag Field
- (string) The XML tag to update.
- Blank – Default. When no tag name is entered Fuga ignores this action.
- Replace Text With Field
- (string) The text to insert into the tag.
- Blank – Default. Clears the text from the tag but does not insert any.
Replace Text Options
This set of options is only visible when the Replace Text option is selected from the Replace Text Type drop-down.
- Replace Text With Field
- (string) The text to insert into the tag.
- Blank – Default. Clears the text from the tag but does not insert any.
Map Tags To Variables Options
This set of options is only visible when the Map Tags To Variables option is selected from the Replace Text Type drop-down. You must insert both the tag name and the variable for this to work (unlike other actions where mapping can take place automatically).
- Variable Column
- (string) Each row specifies the variable containing the text to insert into the corresponding XML tag (in the Tag column of the same row). If you wish to insert text that is not already the value of a variable, you must first assign it to a variable. To add a variable to this column, click the + button on the right side of the parameters area. To delete a variable select the variable from this column and click the x button under the + button.
- Tag Column
- (string) Each row specifies a the XML tag to update with the variable from the same row of the variable column.




