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:
@@ -64,6 +64,16 @@ export const NavPanel = () => {
|
||||
const search = new URLSearchParams(params);
|
||||
search.set('section', section.key);
|
||||
|
||||
/*
|
||||
`media` is Media's own folder, and it goes when you leave.
|
||||
|
||||
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. It is scoped to one section, so it is that section's to keep and nobody
|
||||
else's to inherit.
|
||||
*/
|
||||
if (section.key !== 'media') search.delete('media');
|
||||
|
||||
const body = (
|
||||
<>
|
||||
<Icon className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
|
||||
|
||||
Reference in New Issue
Block a user