Using Search & Replace in Pressbooks
Why use the Pressbooks search & replace tool?
- To locate/identify specific content within the book sections
- To replace a common phrase or word throughout the entire book
- To replace characters or symbols throughout the book
- To replace some HTML code (use with caution)
Before you begin…
The Search & replace tool within Pressbooks is not feature rich. Use with caution and be sure to carefully examine the Preview changes option. When attempting to update HTML code, Pressbooks will often overwrite the changes you are attempting to make and seek to close the HTML tag, which will render your change ineffective at best (or introduce problems). There are two useful ways to use Search & replace.
Using Search & Replace to locate content within the book
- Use Search & Replace as a search tool to locate content areas that need updating, specific details that need to be verified or updated, etc
- Enter your search term and click Search – do not use the replace button
- Right click and open pages that appear in the results in a new tab to avoid losing your place
- If manually replacing something, you can re-run the search tool as you correct specific pages, to see what is left.
Using Search & Replace to replace text, code & more
- Do not attempt to replace complete HTML tags using Search & replace, as Pressbooks will overwrite the output
- Check Preview replacements carefully – note the closing tags added in screenshot below:
- You can replace text within an HTML tag successfully (don’t actually do this with figcaption, it has a purpose)
- Check the Preview replacements carefully to ensure you’re getting the change you require
- If in doubt, don’t replace & save
- More complicated tagging changes should be done in Dreamweaver
Attribution & References
Except where otherwise noted, “Using Search & Replace in Pressbooks” by Jen Booth is licensed under CC BY-NC 4.0.
- Screenshots of eCampus Ontario’s Pressbooks instance with the Search & Replace tool are shared under Fair Dealing (Canada) for educational purposes.
Media Attributions
- Search Replace Pressbooks adapted by Jen Booth is licensed under a All Rights Reserved license
- Search Replace Issues © Jen Booth is licensed under a All Rights Reserved license
- Search Replace HTML Code adapted by Jen Booth is licensed under a All Rights Reserved license