Fix: /admin/content is nu boom-editor + image-grootte knop + custom syntax

- /admin/content is nu de boom-editor (plugin-file-tree structuur),
  consistent met plugin- en thema-editors. Oude tabelweergave verhuisd
  naar /admin/content-list, bereikbaar via 'Boom weergave'/'Lijst
  weergave' knoppen. /admin/content-files redirect naar /admin/content.
- Image-grootte knop in markdown editor-toolbar: selecteer ![alt](url),
  klik knop, breedte/hoogte dialog, {:width=... height=...} syntax
  toevoegen/vervangen. Bestaande waarden worden in prompts getoond.
- Custom-grootte syntax {:width=...} nu ook correct herschreven naar
  /-media/ endpoint (was alleen gewone ![alt](url) herschreven).
- Handleidingen bijgewerkt (content-beheer.md NL+EN: boom/lijst
  weergave uitleg + image-grootte + images in content sectie)
- Release notes v2.6.2 bijgewerkt
- Pentest 30/30, WCAG 25/25
This commit is contained in:
2026-08-19 12:15:56 +00:00
parent e926a3a40d
commit 97c4d52c78
17 changed files with 171 additions and 81 deletions
+21 -4
View File
@@ -2,12 +2,12 @@
CodePress offers two views for content management:
1. **List view** (`/admin/content`) — classic table with filter, upload, new folder/file per folder
2. **Content editor** (`/admin/content-files`) — file browser sidebar + CodeMirror editor (uniform with plugin/theme editors)
1. **Tree view** (`/admin/content`) — default, file browser sidebar + CodeMirror editor (uniform with plugin/theme editors)
2. **List view** (`/admin/content-list`) — classic table with filter, upload, new folder/file per folder
Both work side-by-side and use the same content directory. The content editor offers the same functionality as the list view, but with a nested file-tree sidebar like the plugin and theme editors — for a consistent editor experience.
Both work side-by-side and use the same content directory. Switch between views via the "List view"/"Tree view" buttons at the top right. The tree view offers the same functionality as the list view, but with a nested file-tree sidebar like the plugin and theme editors — for a consistent editor experience.
## Content editor (content-files)
## Tree view (content)
### File browser sidebar
- Shows the nested file tree of `content/`
@@ -19,6 +19,23 @@ Both work side-by-side and use the same content directory. The content editor of
### Editable file types
`.md` (Markdown), `.php` (PHP), `.html` (HTML) — consistent with the existing content-edit page.
### Set image size (Markdown)
The markdown editor toolbar has an "Image size" button (expand icon):
1. Select an image in the editor in markdown format `![alt](url)`
2. Click the "Image size" button
3. Enter width and/or height (px or %, empty = don't set)
4. The `{:width=... height=...}` syntax is added to or replaced on the image
Example:
```markdown
![logo](/content/_images/logo.png){:width="200" height="100"}
```
Existing `{:width=...}` values are shown in the prompts. The size attributes are rendered as `width`/`height` HTML attributes on the `<img>` tag in the frontend.
### Images in content
Images in `content/` are served via the `/-media/` endpoint (content/ lives outside the webroot). Markdown syntax `![alt](url)` with local URLs (relative like `image.jpg`, or absolute like `/content/_images/image.jpg`) is automatically rewritten to `/-media/...`. External URLs (`https://...`) are left untouched.
### Create a new file
- Click **New file** (at the top or per folder in the sidebar)
- Enter a path within content (e.g. `en.page` or `blog/en.post`)
+21 -4
View File
@@ -2,12 +2,12 @@
CodePress biedt twee weergaven voor content-beheer:
1. **Lijst weergave** (`/admin/content`) — klassieke tabel met filter, upload, nieuwe map/bestand per map
2. **Content editor** (`/admin/content-files`) — bestandsbrowser zijbalk + CodeMirror editor (uniform met plugin/theme-editors)
1. **Boom weergave** (`/admin/content`) — standaard, bestandsbrowser zijbalk + CodeMirror editor (uniform met plugin/theme-editors)
2. **Lijst weergave** (`/admin/content-list`) — klassieke tabel met filter, upload, nieuwe map/bestand per map
Beide werken naast elkaarlijk en gebruiken dezelfde content-map. De content-editor biedt dezelfde functionaliteit als de lijst weergave, maar dan met een geneste bestandsboom zijbalk zoals de plugin- en thema-editors — voor consistente editor-ervaring.
Beide werken naast elkaar en gebruiken dezelfde content-map. Wissel tussen de weergaven via de "Lijst weergave"/"Boom weergave" knoppen rechtsboven. De boom weergave biedt dezelfde functionaliteit als de lijst weergave, maar dan met een geneste bestandsboom zijbalk zoals de plugin- en thema-editors — voor consistente editor-ervaring.
## Content editor (content-files)
## Boom weergave (content)
### Bestandsbrowser zijbalk
- Toont de geneste bestandsboom van `content/`
@@ -19,6 +19,23 @@ Beide werken naast elkaarlijk en gebruiken dezelfde content-map. De content-edit
### Bewerkbare bestandstypen
`.md` (Markdown), `.php` (PHP), `.html` (HTML) — consistent met de bestaande content-edit pagina.
### Image-grootte instellen (Markdown)
In de markdown editor-toolbar staat een "Afbeelding grootte" knop (expand-icoon):
1. Selecteer een afbeelding in de editor in markdown formaat `![alt](url)`
2. Klik op de "Afbeelding grootte" knop
3. Vul breedte en/of hoogte in (px of %, leeg = niet instellen)
4. De `{:width=... height=...}` syntax wordt aan de afbeelding toegevoegd of vervangen
Voorbeeld:
```markdown
![logo](/content/_images/logo.png){:width="200" height="100"}
```
Bestaande `{:width=...}` waarden worden in de prompts getoond. De grootte-attributen worden in de frontend als `width`/`height` HTML-attributen op de `<img>` tag gezet.
### Images in content
Images in `content/` worden via de `/-media/` endpoint geserveerd (content/ staat buiten de webroot). De markdown syntax `![alt](url)` met lokale URLs (relatief zoals `image.jpg`, of absoluut zoals `/content/_images/image.jpg`) wordt automatisch herschreven naar `/-media/...`. Externe URLs (`https://...`) worden ongewijzigd gelaten.
### Nieuw bestand aanmaken
- Klik op **Nieuw bestand** (bovenaan of per map in de zijbalk)
- Geef een pad op binnen content (bijv. `nl.pagina` of `blog/nl.post`)