Txt Find Replace

Add find and replace to text editors using UIFindInteraction with UITextSearching, NSTextFinder with NSTextFinderClient, and the highlighting paths that don't pollute the document — temporary attributes on TextKit 1, rendering attributes on TextKit 2, plus the reversed-iteration replace-all pattern. Trigger on 'add a search bar to my editor', 'cmd-F UI', 'replace-all', 'find next', or 'why isn't UIFindInteraction showing up' even without UIFindInteraction named. Use when the user asks for find bars, search highlighting, replace UX, custom find sessions on non-text views, or replace-all crashes on long documents.

sitapix b9404a7 13.0 KB Updated

File contents

sitapix/apple-text/tree/main/skills/txt-find-replace commit b9404a78b7

Frequently asked questions

npx skillmds@latest add sitapix/txt-find-replace