--- description: Format selected text or entire documents, apply schemes in bulk, copy formatted text, and customize rules for spaces, punctuation and indentation. --- # One-Click Formatting **One-click formatting** uses preset rules to tidy spaces, blank lines, punctuation and paragraph indentation. Use it to clean up pasted text or apply consistent text formatting throughout a work. Normal formatting changes the body text, not the document title. **Format and Copy on the Fly** only formats the clipboard copy and leaves the original unchanged. For fonts, sizes, line spacing and backgrounds, see [Themes and Editor Styles](./theme.md#themes-and-editor-styles). ## Using one-click formatting In the editor, press F9 or Ctrl + G (⌘ + G on macOS) to apply the current scheme. The editor in floating windows supports the same shortcuts. To format a few paragraphs, select from the beginning of the first to the end of the last. The selection must include at least one complete paragraph containing text. Selecting only a few words, whitespace, or parts of two adjacent paragraphs applies the command to the **entire document**. Right-click and check whether the menu says **One-Click Formatting (Selected Paragraphs)** or **One-Click Formatting (Entire Document)** before proceeding. ![Selecting a complete paragraph for formatting](/assets/format-selection%402x.D9cR8Kq_.png) If you select a block of table cells and at least one contains text, WonderPen formats each selected cell and leaves the rest of the table unchanged. Selecting only empty cells formats the entire document. In Continuous View, the command acts on the editor you last focused. You can also click **One-Click Formatting** in the editor status bar, or choose it from the body text's context menu. To undo formatting performed in the editor, press Ctrl + Z (⌘ + Z on macOS). A word selected automatically by right-clicking does not count as a paragraph selection. Select complete paragraphs first to format a passage. ### Choosing and using a scheme Hover over the one-click formatting button in the status bar to open the scheme panel: ![Default, Novel, Blog and Newsletter schemes in the one-click formatting panel](/assets/format-panel%402x.BXA8DLzs.png) | Action | Result | | --- | --- | | Click a scheme name | Select it as the current scheme without formatting; a dot marks the current choice | | Click the play button beside a scheme | Apply that scheme to the complete paragraphs covered by the selection or the entire body text, without changing the current scheme selection | | Click the copy button beside a scheme | [Format and copy on the fly](#format-and-copy-on-the-fly), without changing the original document | | Click the gear beside the panel title | Open the formatting settings to manage schemes and rules | ### Formatting multiple documents Right-click a document in the document tree and choose **One-Click Formatting** to format it, or **One-Click Formatting (Include Children)** to format it and all its descendants. ![One-Click Formatting and Include Children options in the document tree context menu](/assets/format-tree-menu%402x.BplZ_sSS.png) To format a specific set of documents, select them in the document tree, right-click and choose **One-Click Formatting**. ![Three selected documents ready for batch formatting through the context menu](/assets/format-batch-menu%402x.DmvHJBmg.png) Batch formatting and **One-Click Formatting (Include Children)** process the entire body of each document. For a single document, the regular command follows the selection rules above. ### Format and copy on the fly The copy button beside each scheme is **Format and Copy on the Fly**. It formats the current document's **entire body text** with that scheme and copies the result to the clipboard **without changing the document**. It copies the full formatted body even when only part of the text is selected in the editor. ![Format and Copy on the Fly button beside the Novel scheme](/assets/format-copy%402x.B3BkgaOH.png) This is useful when publishing an article elsewhere while keeping the original in WonderPen. The result uses your current plain text, rich text or Markdown copy format; see [Copy and Paste](./editor.md#copy-and-paste) for the settings. To **change the document before copying**, right-click its title at the top of the editor and choose **One-Click Formatting & Copy Content** or **One-Click Formatting & Copy Title and Content**. These commands apply normal formatting, then copy the full body text; the latter also includes the title. Clear the text selection first if you want to format the entire body. ## Formatting schemes Each **formatting scheme** stores a set of rules and their execution order. Create schemes for different purposes, then switch between them in the status bar panel. ### Creating and editing schemes Open **Settings → Advanced → One-Click Formatting**, or click the gear in the status bar panel: 1. Click **Manage** beside the **Scheme** drop-down to open the scheme list. ![Manage button in the One-Click Formatting settings](/assets/format-manage%402x.Cr_xkyO0.png) 2. Click **Add**, enter a name such as “Novel”, “Blog” or “Newsletter”, and press Enter to confirm. To change an existing scheme, click its edit button to rename it, drag the handle on the left to reorder it, or click its delete button to remove it. ![Add button and the editable Novel scheme name in the scheme list](/assets/format-schemes%402x.UowBHHjd.png) 3. Click **Go Back**, choose the scheme in the **Scheme** drop-down, then select its rules and drag the handles on the left to change their execution order. ![Novel scheme selected for editing its rules and execution order](/assets/format-edit-rules%402x.Cg5QfZFG.png) Changes to scheme names, checked rules and their order are saved automatically. If **Add** is disabled and shows a lock, check the features available to your account. See the [plan comparison](https://www.tominlab.com/wonderpen/plans) and the app for current details. New schemes start with the app's default rules, rather than copying the current scheme's custom rules. Their names do not automatically enable different rules. Here are some ideas for customizing them: | Custom scheme | Suggested setup | | --- | --- | | **Novel** | Tidy extra spaces, blank lines and quotation marks; for Chinese fiction, you can enable **Indent paragraph by 2 spaces** | | **Blog** | Remove leading and trailing whitespace, disable paragraph indentation and keep blank lines between paragraphs; add spacing between Chinese and English where needed | | **Newsletter** | Follow the publication's requirements for indentation and blank lines, and remove extra blank lines at the beginning and end | These three schemes in the screenshot are custom examples, not built-in presets. Their names identify their purpose; their checked rules and execution order determine the result. ### Using schemes across Libraries **Libraries on the same computer share scheme definitions, but the current choice is remembered per Library:** - Switching schemes in a Library window's status bar panel, or in the settings opened from its gear, changes only that Library's selection. - Switching schemes in the separate **Settings** window changes the default choice for Libraries that have not selected their own scheme. - Editing a scheme's rules affects future formatting in every Library on that computer that uses it. Existing content is not reformatted automatically. ## Formatting rules In the formatting settings, choose a scheme before adjusting its rules. ![](/assets/format-rules%402x.nBA_35Nu.png) Only checked rules take effect. The rules run from top to bottom, and you can drag them to change the order. **Restore to Default** resets the current scheme’s checked rules and their order, keeping its name and all other schemes. The tables group the available rules by category. A ✓ marks a rule enabled by default. Rules run in the order shown in the settings, not the category order below. **Whitespace and blank lines** | Rule | Default | | --- | :---: | | Remove trailing whitespace characters of each line | ✓ | | Remove leading and trailing whitespace characters of each line | | | Ensure that there is at least one blank line between paragraphs | ✓ | | Merge multiple consecutive blank lines | ✓ | | Remove empty lines at the beginning of the text | ✓ | | Remove empty lines at the end of the text | | | Remove solo empty lines (keep runs of two or more) | | | Remove blank lines | | | Merge multiple consecutive spaces | ✓ | | Remove all spaces | | **Mixed Chinese and English** | Rule | Default | | --- | :---: | | Add a space between Chinese and English | | | Remove spaces between Chinese and English | | | Remove spaces between full-width characters | | **Punctuation** | Rule | Default | | --- | :---: | | Replace the half-width comma with a full-width comma (`,` → `,`) | | | Replace the half-width period with a full-width period (`.` → `。`) | | | Replace the half-width quotation mark with a full-width quotation mark (`""` → `“”`) | | | Quote correction (`”aaa“` → `“aaa”`) | | | Curly Quotes to Corner Quotes (`“”` → `「」`, `‘’` → `『』`) | | | Corner Quotes to Curly Quotes (`「」` → `“”`, `『』` → `‘’`) | | | Ellipsis Normalizer (`...` → `…`, `......` → `……`) | | **Indentation** | Rule | Default | | --- | :---: | | Indent paragraph by 2 spaces | ✓ | ### Rule effects and execution order - **Indent paragraph** adds two full-width spaces (`  `) at the beginning of each paragraph, replacing any existing leading whitespace. Headings, code blocks and display formulas are not indented. Lists and tables are also left unindented when processed as whole structures, but selecting text within a single list item or table cell still indents the ordinary paragraphs covered by that selection. Ordinary paragraphs still receive indentation when they begin with literal Markdown-style text such as `-`, `>` or a numbered prefix. Paragraphs containing images or inline formulas may also receive leading spaces. This is a convention of Chinese typography and is enabled by default; turn it off if you write in English. - **Replace the half-width comma / period with a full-width one** replaces every half-width comma or period in the text, including those in English sentences and in numbers such as `3.14`, so it is best suited to text written entirely in Chinese. - Usually, choose just one of two opposing rules, such as adding or removing spaces between Chinese and English, or keeping or removing blank lines between paragraphs. - Later rules can change earlier results. For example, removing leading and trailing whitespace after adding paragraph indents removes those indents. To keep indentation, place its rule after the whitespace cleanup rules. ::: tip One-click formatting tidies existing text. To indent new paragraphs as you type, enable **Automatically add two spaces at the beginning of a new paragraph** in **Settings → Advanced → Document Editing**. ::: ## Mobile One-click formatting is also available on mobile: tap the one-click formatting button in the editor's **Quick Actions Bar**, and adjust the rules in **Editor Settings**.