CelesteCS Conditions plug-in allows you to automatically highlight and replace specified text on the page. The following article describes how to do it.
In this scenario we will show how to make the specified text automatically highlighted.
Step 1. Adding Conditional Rules Manager macro to a page
Conditional Rules Manager macro is used to manage all conditional rules and specify the contents to be processed. Both rules macros and contents are added to its body.
Open macro browser, locate Conditional Rules Manager macro and place it to the page. Add text you want to be processed into the Conditional Rules Manager’s macro body.
Step 2. Adding Conditional Rule macro and its configuration
Conditional Rule macro represents a single conditional rule with details on what to check and which formatting to apply.
Open macro browser, locate Conditional Rule macro and select it to be added. Specify the following configuration parameters:
- Rule condition: ‘Element value is equal to’. All rules are supported for table cell conditional processing. Whole text processing is supported by ‘Element value is equal to’ rule only.
- Value 1: <The original text value you want to be highlighted>. You may specify any text. If different parts of the text are formatted differently, it may not be found.
- Applies to: ‘Whole text’. This is very important. Default value here is ‘All tables’, which means that only the tables will be processed. Specify ‘Whole text’ value for the whole macro body text to be processed.
- Background color: ‘Yellow’. We just want to highlight the text, thus we do not specify any other formatting parameters, meanwhile all of them are supported.
Press the ‘Refresh’ button if you want to see how the text will be formatted.
Press the ‘Insert’ button for this macro to be added.
Step 3. Save the page and check the result
Everything is configured and you may save the page. In our example we specified a ‘dolor’ word to be highlighted.
As you can see, all the ‘dolor’ word parts are highlighted.
We will extend the previous scenario with text replacement.
Step 4. Configuring Conditional Rule macro for text replacement
Conditional Rule macro allows you to specify the replacement text.
Open the page, created in the previous scenario and edit the following parameters or Conditional Rule macro:
- Background color: ‘Yellow’. We will leave this value for this scenario to show the replacement really works. After you are sure everything is OK, you may clear this parameter value to leave original colors.
- Replacement text: <Text to replace the replaced text with>. As ‘dolor’ is a ‘pain’ in Latin, we want to replace it with ‘beatitudinem’, which is ‘happiness’.
Press the ‘Save’ button to save a new configuration.
Step 5. Save the page and check the result
Everything is configured for the text to be highlighted and replaced. In our example we should see the ‘beatitudinem’ word highlighted.
That’s it! Have a try other formatting parameters.