Skip to content

Commit b42203d

Browse files
[update] align server guide with source behavior
- soften status-field wording: success/failure is detected by the uploader layer; RichText builds the image from value/width/height - add limitation note that inline images are dropped by DOCX/PDF export
1 parent d22db6d commit b42203d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/guides/working_with_server.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This works without any backend and is handy for quick demos, but it has clear li
2424
- the encoded bytes live inside the document, so the saved HTML grows with every image
2525
- the same image in two documents is stored twice — there is no shared resource to deduplicate
2626
- because the bytes are not a separate resource, the server cannot serve them from a CDN or post-process them (resize, re-encode, scan)
27+
- inline images are not preserved by the built-in DOCX / PDF [export](api/events/export.md) — if you rely on export, configure an upload server so images reference an external URL
2728

2829
## Write your own server
2930

@@ -60,7 +61,7 @@ The server must reply with a JSON object. RichText reads the following fields:
6061

6162
| Field | Type | Meaning |
6263
| -------- | ------- | ----------------------------------------------------------------------- |
63-
| `status` | string | Result marker. A successful upload must return `"server"`. Any other value (for example `"error"`) is treated as a failed upload, and the image is not inserted. |
64+
| `status` | string | Success markerreturn `"server"` for a successful upload. The uploader uses this field to tell a completed upload from a failed one; any other value (for example `"error"`) marks the upload as failed. The inserted image itself is built from `value`, `width`, and `height`. |
6465
| `value` | string | URL of the stored image. RichText writes this string verbatim into the document as the `src` of the inserted `<img>`. |
6566
| `width` | integer | Width used to size the inserted image, in pixels. |
6667
| `height` | integer | Height used to size the inserted image, in pixels. |

0 commit comments

Comments
 (0)