Skip to content

Commit ab2804b

Browse files
committed
Updating docs
1 parent 10e01e0 commit ab2804b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ Notes:
9292
- Enable with `enableImagePasteDrop`.
9393
- Provide `onUploadImage` to upload files and return final `{ src }`.
9494
- Optional fallback with `imageFallback="data-url"` for base64 insertion.
95+
- Swap behavior:
96+
- The editor preloads the final uploaded URL before replacing the temporary `blob:` preview.
97+
- If preload fails or times out, the editor keeps the temporary preview and marks the image with an upload error state.
9598
- Pending uploads:
9699
- Use `onPendingUploadsChange` to disable autosave/publish while uploads are in progress.
97100

src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,11 @@ export default function App() {
345345
pass <code className={inlineCodeClass}>onRequestImage</code> to replace the default image prompt with your
346346
own modal or picker, plus <code className={inlineCodeClass}>onUploadImage</code> for paste/drop uploads.
347347
</p>
348+
<p className="mt-4 leading-relaxed">
349+
During uploads, the editor inserts a temporary local preview immediately, then preloads the final uploaded
350+
URL before swapping <code className={inlineCodeClass}>src</code>. If preload fails or times out, it keeps
351+
the temporary preview and marks an upload error on that image.
352+
</p>
348353
<HighlightedCode
349354
dark={resolvedIsDark}
350355
lang="tsx"

0 commit comments

Comments
 (0)