Custom Cleaner Editor

What is a Custom Cleaner?

A custom cleaner is one or more user-defined actions that can be applied to text. For example, you can use a “Find and Replace” text action to set up an automated find and replace on given text. This action can include regular expressions, a powerful text matching syntax. Another example might be to apply another cleaner (either built-in or custom), and then add additional actions, allowing you to build on existing cleaners.

Text vs. Style

TextSoap supports changing both plain text and rich text. When working with rich text, the text formatting (style) of the text plays an additional role.

You can make text change actions on rich text and TextSoap will attempt to maintain the existing character styles from the original text. This means that bold words stay bold, italic words remain italic, and underlining, fonts and text color stays intact, even as the text is updated.

Additionally, TextSoap allows changing the underlying (character-level) format of the text. This is useful if you need to strip out existing styling like bold or italic, adjust the font, or size. TextSoap can perform the style changes selectively based on the underlying text.

Note: Microsoft Word text may also use Stylesheets to format it. As the macOS frameworks we rely on do not currently support RTF with stylesheets, TextSoap is unable to support maintaining them.

Editor Overview

Before getting started, a quick walk through of the new interface is in order. The custom cleaner (CC) editor has some key components.

Custom Cleaner Editor
Custom Cleaner Editor

Workspace

Within the workspace area, you specify the actions to perform on text. Grouping actions can contain other actions.

Each action contains a common header components:

Action Header
Action Header

Basic Editing

Actions List
Action List
Action List

The workspace consists of actions added to it (either via drag-n-drop, double-click, or copy/paste). These actions fall into categories:

For a closer look at core and grouping actions, see the topic Custom Cleaner Actions.

Lists Editor

Lists Editor
Lists Editor

Select the “Lists Editor” option in the toolbar to switch to Lists.

Lists allow you to work with a larger set of data by allowing you to look up associated data.

The table consists of rows with up to 4 columns of text. You can copy or paste tab-delimited text and use drag-n-drop to re-arrange rows.

The master list can be divided into sections. There is no real hierarchy, a section is defined as the items from the marker to the next marker (or end of list).

The batch-related actions can use these lists to process multiple find and replaces, setup hyperlinking, etc. If “All Items” is specified, then all the rows will be processed. If a specific section is specified, only those items will be used.

The Find Bar at the top of the list allows for global find and replace. Options include matching case, and limiting the search & replace to specific columns.

Review Custom Cleaner Actions to better understand how some of these core actions work with Lists.