Global Find and Replace
Thanks to the Global Find and Replace feature, it is now possible to find and replace text, topic links, and file links. The following entities can be searched in a single place across your entire portal: topics, styles, scripts, ToDo items, Index keywords, TOC nodes, and Unresolved/Resolved/Deleted review comments. So, you can easily clean up your content and styles, find and replace all occurrences of an external URL, and much more! There is no need to do it manually.
Here is how you can get to it:
- Open Projects page.
-
Click Tools, then click Global Find and Replace.
-
The Global Find and Replace page will open. It looks like this:
When searching and replacing text, this function handles the following locations:
- Topic title,
- Topic HTML source,
- Styles,
- Scripts,
- ToDo items,
- Index keywords,
- TOC nodes,
- Unresolved/Resolved/Deleted review comments.
Let's take a look at a use case: we have a project about robots creation, and we want to change the word "parts" to "components". Here are the steps to do this:
- Open Global Find and Replace.
-
Select the search mode. We'll use the Text mode.
-
Fill in the search string.
-
Check the filter boxes to specify the search areas.
-
Click Find All to see the results.
- In the search results list, you can select the topics in the content of which you want to change the word.
-
Fill in the Replace with field.
- Click Replace Selected or Replace All depending on your goal. We will click Replace Selected to change the word in 4 selected topics.
-
Then you will see the result.
Global Find and Replace Use Cases
Scenario #1 — Find and Replace Text
This is the simplest use case, and it is straightforward — just follow the steps described above in our example.
Scenario #2 — Find and Replace Links to Topics, External Links, and File Links
For example, we need to find all topics where we added a specific YouTube link. To do this:
- Copy a link to that video and paste it to the search string.
- Check the filter boxes as it's shown in the screenshot.
- Then click Find All to see the results.
Scenario #3 — Find and/or Replace Text in ToDo Items, Review Comments, Index Keywords, TOC Node Titles
Note | |
You can't replace text in ToDo items and Review Comments. |
The steps are the following:
- Fill in the search string with the text you are looking for.
-
Check the relevant search filter boxes.
- Click Find All.
- Fill in the Replace with field.
- Click Replace Selected or Replace All depending on your needs.
Scenario #4 — Find and Replace Variables
In this case, you should use regular expressions. To learn more, refer to this topic: Regular Expressions.
Scenario #5 — Clean Up Topics After Importing
In this case, you should use regular expressions. To learn more, refer to this topic: Regular Expressions.
Scenario #6 — Find and/or Replace a Variable, Snippet, Conditional Block
For example, to find out in what topics a snippet is used, do the following:
- Open your topic and click Edit.
-
Click a snippet and then click the Global Find and Replace icon.
-
Then you'll see the results.
-
You can apply custom search filters.
-
Then fill in the Replace with field — you can just click the
field and ClickHelp will provide you with the recently viewed topics, so you
can just click one of them.
-
Otherwise, you may insert the link of a topic.
-
Then select a topic where you want to replace the link and click
Replace Selected or, if it's needed, click
Replace All.
-
Then you'll see the result:
Scenario #7 — Find and Replace a Video Link
For example, you embed a video from YouTube in different topics but you need to replace it with a new one. Follow the steps:
- Open a topic with the video.
-
Click the video the link of which you want to replace.
- Global Find and Replace will open.
- On YouTube, find the new video you'd like to use.
- Click Share, then click Embed.
-
Copy the link URL as it's shown in the screenshot.
-
Paste the URL to the Replace with string.
-
Then select a topic where you want to replace the link and click
Replace Selected (or, if it's needed, click Replace All).
-
Then you'll see the result.
To find more use cases, refer to this topic: Regular Expressions.