docs(BlockEditor): document mediaSlug media library link and add server helpers

- update image block schema in README table to include `mediaSlug?` and clarify fields
- add "Liaison avec la médiathèque" section documenting mediaSlug behavior, read-only alt/caption, and internal `_` fields
- document new server helpers (`normalizeImageBlocks`, `enrichBlocksWithMedia`, `syncBlockImageReferences`) with usage examples
- add `block_image` field convention to media feature README with cross-references
- implement `mediaLink.server.js` with the three server-side helpers
- store `mediaSlug` on image block at insertion time in `Image.client.js`
- persist `mediaSlug` through clipboard paste/duplicate in `clipboard.js`
- export `mediaLink` entry point in `package.json` exports map
This commit is contained in:
2026-04-26 20:22:22 -04:00
parent 8c5c3baec4
commit 31d0359163
6 changed files with 501 additions and 43 deletions
+3
View File
@@ -151,6 +151,9 @@
"./shared/components": {
"import": "./dist/shared/components/index.js"
},
"./shared/components/BlockEditor/mediaLink": {
"import": "./dist/shared/components/BlockEditor/mediaLink.server.js"
},
"./shared/icons": {
"import": "./dist/shared/icons/index.js"
},