File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments