a real editor for the site's copy, and the media param stops following you

Two things.

`?media=` is Media's own folder and now goes when you leave it. It survived
every navigation, so `?section=home&media=GALLERY/CALAVERA+1` was an ordinary
URL — a parameter naming a folder in a section that is not open, carried into
every link and shared or bookmarked that way.

And the intro is a tiptap editor rather than a textarea of raw HTML. HTML in and
HTML out, because that is already what the site's database holds and renders —
introducing a second format would buy a migration and a round-tripping bug class
for nothing.

Declared as the PLUGIN's npmDependencies, not added to the platform's
package.json. That lockfile is frozen and shared, and npm-deps.ts exists for
exactly this: everything lands in plugins/node_modules/, so a plugin's editor
cannot move a version the platform depends on.

The toolbar is only what the site's stylesheet can render. Anything more would
produce copy that looks right while editing and wrong when published, which the
person only discovers after saying it was done.

The content effect compares against getHTML() before writing back, and that
comparison is the whole thing: while somebody types the two already agree, so
nothing is pushed in and the caret stays put. Without it this is the classic
controlled-contentEditable bug where the cursor jumps to the end on every
keystroke.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-29 20:15:55 +01:00
co-authored by Claude Opus 5
parent 3ae8c960e5
commit d57bd3e72f
4 changed files with 250 additions and 8 deletions
+19
View File
@@ -48,6 +48,25 @@ export const manifest: PluginManifest = {
// Nothing to declare. It talks HTTP to fofos and stores one row; there is no host binary anywhere
// on the path, and fofos itself is a separate deployment rather than something this installs.
/*
The rich text editor for the site's copy.
Declared here rather than added to the platform's package.json, which is frozen and shared: these
are installed into `plugins/node_modules/` alongside every other plugin's, so nothing about this
plugin's editor can move a version the platform depends on.
`@tiptap/extension-text-align` was already in the platform's dependencies with nothing importing
it — a leftover from an earlier attempt. It is asked for here too, so this plugin's copy is
resolved by the same rule as the rest rather than by whatever happens to be up the tree.
*/
npmDependencies: {
'@tiptap/react': '^3.15.3',
'@tiptap/starter-kit': '^3.15.3',
'@tiptap/pm': '^3.15.3',
'@tiptap/extension-text-align': '^3.15.3',
'@tiptap/extension-link': '^3.15.3',
},
permissions: [
{
key: 'fofos-admin',