Sometimes the right tool is another app. MojoPad cooperates instead of competing.
Edit ▸ Edit Page in External Editor opens the current page in your text
editor — Markdown pages as .md, plain text as .txt, rich text
as .html. Every time you save there, the page updates here, live.
If the page changes here while it is open there — you type in it, Replace in All Pages changes a word in it, an assistant adds a line — your next save there still updates the page, but what the page said here is saved in Page Versions first, and a note names the page so you know to look. A page with a password of its own keeps no versions, so then your save is not taken: the note says so, and you can copy what you need from your editor into the page, then open it there again.
When a page with a password locks — after the time set in Settings ▸ Security, or because its password changed in another window or on another Mac, even while the bar at the top of the page is holding changes you made to it — MojoPad deletes your editor’s copy of it at once, and a note names the page. The same happens to every copy a window handed out when the wiki itself locks. Your editor’s window still shows the words, but nothing you save there comes back anymore: anything you typed there that isn’t in the page is still in that app, so copy what you need from it. To go on editing there, unlock the page and choose Edit Page in External Editor again. If MojoPad can’t delete the copy — another app is holding it open, say — the note says so instead and names the folder it is in: nothing you save there comes back all the same, and MojoPad tries again when you quit.
Pick the editor in Settings ▸ Files & Backups ▸ External apps. Press Choose… beside External text editor and your Applications folder opens: pick the app, and it is kept. You can type an app’s name instead, as it appears in your Applications folder — BBEdit, or Visual Studio Code — and it is kept as you type, even if you close Settings right away. Left empty, pages open in the app your Mac uses for plain text, which is TextEdit unless you have changed it.
If no app on your Mac has the name you typed, MojoPad says so, names it, and opens nothing — check the spelling, or use Choose…. Something that is not an app is never used: MojoPad tells you before it makes any copy of the page.
The editor works on a copy of the page, kept in your Mac’s temporary folder and readable only by you. (On Linux, where the temporary folder is shared by every account on the computer, MojoPad keeps it in your session’s own private folder instead, or in its own settings folder, and writes nothing in a folder another account could reach.) MojoPad deletes it — with anything your editor saved beside it — when the page or the wiki locks, when you close the window, and when you quit; a copy left behind by a crash is deleted the next time MojoPad starts. When the window reloads (the Reload button on the bar that says a page changed on another device, say), or stops working and is reloaded, the copy of a page with no password keeps working, and your saves there still come back; the copy of a page with a password, or in a wiki with one, and a picture’s copy are deleted, and a note in the reloaded window says so. Opening another wiki in the window deletes every copy it handed out, and says so too. On a page with a password, or in a wiki with one, MojoPad asks every time before it writes that copy, and says plainly that your editor gets it with no password, because your editor may also keep copies of its own that MojoPad cannot clean up. If the page or the wiki locks while that question is on screen, or the window closes or stops working, no copy is made, whatever you answer. A picture you double-click is asked about the same way, and its copy is deleted when the page it is in locks.
Double-click any image in a page and it opens in your image editor — Acorn, Pixelmator, Preview, whatever you set with Choose… beside Image editor (left empty, the picture opens in the app that usually opens it). Crop it, mark it up, save — the image in your page updates the moment you do. Once the page it is in locks, or the wiki does, nothing saved there comes back into the page, and a save that was already on its way is not taken: a note says so. Option-double-click saves the image out to a file instead. (Sketches are the exception: double-clicking a sketch reopens MojoPad's own canvas — see Formatting.)