Configuring preview filters for Visual mode
A problem can occur in Visual mode if a source content page contains in-line references to files that should not be sent to XTM Cloud with that source content page, and used for generating a preview. Sometimes, It is also necessary to be prevent certain types of source content file from being sent to XTM Cloud for translation.
Example
A source content page contains a reference to a nested REACT application that relies on dynamic data pulled from a REST API. This prevents the preview from being displayed. In such a case, you might need to filter out the scripts that break the page rendering.
Excluding unwanted file types or files
To resolve problems of this kind, you can define filters to exclude specific file types, or files in specific locations, so they are not sent to XTM Cloud with or as translatable content. To do so, use regular expressions (also known as "regex").
On your localhost, in your instance of Adobe Experience Manager, open the OSGi Console.
Select Configuration Manager. The Configuration Manager is displayed in the Configuration tab screen.
Find the XTM Preview Configuration section and select it, to edit the configuration values in it. You can make two different sets of settings, described in the table below:
Reference filters: filter in-line references to other files, in source content files, to ensure that only relevant reference files are sent to XTM Cloud. See the Reference filter Preview filter type below.
Custom HTML reference patterns: use these to define custom regular expressions that extend a preview package by including additional assets. You can specify asset types and locations to be included. See the Custom HTML reference pattern Preview filter type below.
Preview filter settings
Make these settings, if required:
Preview filter type | Entry field | Description | Examples |
---|---|---|---|
Reference filter | Reference filters |
| Reference filter examples
|
Custom HTML reference pattern | Custom HTML reference patterns |
| Custom HTML reference pattern filter example
|
Warning
If you define an invalid regular expression, it will not be taken into account. For trouble-shooting, you will find a WARN message about it in the logs.
Note
For details of other Visual mode-related topics, see Configuring Visual mode.