- 7 minutes to read

Replace Content

New 7.12

A database server is renamed, a queue moves, an old system name has to go. Replace content changes the text in every Article, Snippet, and Template at once, and shows you each occurrence before anything changes. It works like Content Search, with a Replace with box.

  • ✅ Preview every occurrence, before and after, with its section and line
  • ✅ Untick what should stay, per occurrence or per document
  • ✅ Change only the content: never titles, Tags, metadata, or generated sections
  • ✅ Undo per document: each changed document gets a Replaced revision first

Replace content, animated walkthrough: type the text and its replacement, preview, untick what should stay, confirm, and see the result per document (7.12)
Animated walkthrough: renaming the server CONTOSO-SQL01 to CONTOSO-SQL02 in four Contoso runbooks: open with Ctrl+Shift+H, preview, untick one occurrence, confirm, and read the result.

Understanding Replace Content

graph LR Form[fa:fa-keyboard Text and
replacement] Preview[fa:fa-list-check Preview
every occurrence] Pick[fa:fa-square-check Untick what
should stay] Revision[fa:fa-clock-rotate-left Replaced
revision] Result[fa:fa-check Result
per document] Form --> Preview Preview --> Pick Pick -->|"Replace, confirm"| Revision Revision --> Result style Form fill:#2678BD style Preview fill:#93d16d style Pick fill:#FFD525 style Revision fill:#3F827B style Result fill:#93d16d

You type the text and its replacement (blue). The preview (green) lists every occurrence; you untick what should stay (yellow). After you confirm, each document first gets a Replaced revision (teal), then the text changes and the result lists every document (green).

What Replace content changes it?
The content of Articles, Snippets, and Templates: the main body, and the Content Parts of a profile-based Article Yes
Titles, slugs, Tags, and Custom Metadata No
Generated parts and Snippet parts of a profile-based Article, and Document Profiles No
Documents shipped by Nodinite, and deleted documents No
In HTML documents: tags, attributes, link targets, image paths, macros ({{ }}, {% %}), {nd…} tokens, and icon shortcodes No; only the visible text changes

To replace content, you need the Administrator Role, or a Role with Modify on Articles. Without it, Ctrl+Shift+H does nothing and the dialog has no Replace switch; Content Search still works with the read right. To only find text, use Content Search; to change one document, use the editor's find and replace.

Replace Across Documents

  1. Press Ctrl+Shift+H on any page, also over another dialog. Replace content opens. In Search content, you can also turn on the Replace switch; Ctrl+Shift+F switches back to search.

    Replace content dialog as Ctrl+Shift+H opens it, with the search box, the Replace with box, Preview, the options cog, the Articles, Snippets, and Templates types, and the Replace switch on (7.12)
    The dialog says what it changes: Only the content of documents changes, never titles, tags or generated sections.

  2. Type the text to find and, in Replace with, its replacement. An empty Replace with removes the match. Tick the document types: Articles, Snippets, Templates.

  3. Choose the find mode under . Phrase (the default here) finds the words side by side; Regular expression lets the replacement use groups such as $1 or ${name}. Match case and Whole word apply as in Content Search options; Words isn't offered for replacing.

  4. Press Enter or click Preview. Nothing changes yet.

    Replace content preview: 7 occurrences in 4 documents, a card per document, and per occurrence the section, the line, and the text before and after (7.12)
    Each occurrence shows the text before (struck through) and after (marked). The last entry of INT1001 crosses bold text, so it is listed as edit manually.

  5. Untick the occurrences that should stay, or a whole document with its own checkbox; Select all and Select none work on everything. A document with some occurrences unticked shows a dash in its checkbox.

  6. Click Replace n selected, and confirm. The confirmation says how many occurrences and documents change, and that each document gets a revision first.

    Confirmation at the bottom of the preview: Replace 6 occurrences in 4 documents? Each document gets a revision first, with Replace and Cancel (7.12)
    The profile-based INT1003 lists only its Content Part Notes; its Generated part is never offered.

  7. Read the result: one row per document, with the number of replaced occurrences. Preview again searches once more, for example to check that nothing is left.

    Replace content result: Replaced 6 occurrences, with Preview again and one row per document marked Replaced 1 or Replaced 2 (7.12)
    The result per document.

What the Preview Doesn't Replace

  • Edit manually: a match that crosses formatting, a link, or an encoded character, such as **CONTOSO**-SQL01, or München in an HTML document that stores it as München, can't be replaced safely. The preview lists it with a hand icon and without a checkbox, with Open in the editor at line n. Change it there. Content Search finds such matches because it searches the text as the reader sees it.

    Replace content preview for München to Munich: 0 occurrences in 1 document, with the match in INT1006: Deliveries from the Bavarian warehouse marked Crosses formatting, a link or an encoded character, and Open in the editor at line 1 (7.12)
    The Article stores the umlaut as a character entity, so the match has no checkbox and counts as 0 occurrences.

  • Link targets and the other HTML parts in the table above are never matched, so they don't show in the preview at all.

  • A document can have at most 1000 occurrences in one replace.

When a Document Is Skipped

The result names each document that wasn't changed, and why:

Message Why What to do
Changed since the preview; preview again. Someone saved the document after your preview Click Preview again, then replace
Deleted; restore it first. The document was deleted Restore it, see Show deleted records
Shipped by Nodinite; it cannot be edited. Nodinite ships the document read-only Leave it, or copy it to a document of your own

Changing the text, the replacement, or an option after a preview blocks Replace until you preview again, so you always replace what you saw.

Undo a Replace

Before a document changes, Nodinite saves its current text as a revision with the reason Replaced. All documents changed by one replace share one correlation. To undo, open the document's History and restore the revision before the replace; see Revision History.

History card of an Article with two revisions, both marked with the Replaced badge (7.12)
Revisions written by Replace carry the Replaced badge.

Find and Replace in the Editor

To change one document, use the editor's own find bar. It works in the Article, Snippet, and Template editor, Markdown or HTML, and in the content sections of a profile-based Article.

Keys Does
Ctrl+F Find in this editor
Ctrl+H Find and replace: the bar adds Replace with, Replace, and Replace all
Enter / Shift+Enter Next / previous match; in the replace box, Enter replaces the current match
Esc Close the bar

The bar shows 1 of n, and has Aa (match case), Word (whole word), and .* (regular expression). A read-only editor offers find only. Inside the editor, Ctrl+Shift+F and Ctrl+Shift+H still open Search content and Replace content.

Markdown editor with the find and replace bar: CONTOSO-SQL02, 1 of 2, the options, and Replace and Replace all, with the matches marked in the text (7.12)
In Markdown, the current match is outlined. The link target and the **CONTOSO**-SQL01 that crosses bold are not matched.

HTML editor with the find bar, the matches marked in the visible text only (7.12)
In the HTML editor, only the visible text is searched; tags are never searched or changed.

In a profile-based Article, one bar, Find in the content sections, covers all Content Parts. Generated and Snippet sections are locked, so they are never searched or changed.

Profile-based Article workspace with one find bar over the Notes Content Part, and the locked Generated part Ports below it (7.12)
The Generated part Ports keeps its text; the preview on the right still shows its CONTOSO-SQL01.

Replacements in the editor change only the editor. Save to keep them as a normal revision, or leave without saving to drop them.

On the reader page, Ctrl+H opens the document in the editor with the find bar's text, or the selected text, in the replace bar. It works where the page offers Edit, never for shipped or deleted documents.

Frequently Asked Questions

Can I replace in titles or Tags?

No. Replace content changes only the content of documents. Edit a title on the document's edit page, and change Tags with With Selected > Manage Tags on the document list.

Why is one occurrence listed without a checkbox?

It crosses formatting, a link, or an encoded character, so it can't be replaced safely. Click Open in the editor at line n, and change it there. See What the Preview Doesn't Replace.

How do I undo a replace in many documents?

Restore the Replaced revision in each document's History. See Undo a Replace.

Why is a profile-based Article's generated text not replaced?

Generated parts are rebuilt from their source, for example from BizTalk; a replace there would be overwritten. Change the source, or regenerate the part.

Next Steps