diff --git a/site/index.ts b/site/index.ts index 554a6a67..65dd78ac 100644 --- a/site/index.ts +++ b/site/index.ts @@ -121,12 +121,6 @@ const ImageUploadHandler: ImageUploadOptions["handler"] = (file) => * NOTE: synchronous renderers can simply return Promise.resolve() */ const examplePreviewRenderer: PreviewRenderer = async (content, container) => { - const spinner = document.createElement("span"); - spinner.className = "is-loading"; - spinner.textContent = - "Intentionally delaying render for example purposes..."; - container.appendChild(spinner); - // add a fake load delay (because we can) await sleepAsync(500); diff --git a/src/commonmark/plugins/preview.ts b/src/commonmark/plugins/preview.ts index 94bdb8a9..b356cd26 100644 --- a/src/commonmark/plugins/preview.ts +++ b/src/commonmark/plugins/preview.ts @@ -99,8 +99,6 @@ class PreviewView implements PluginView { // if showing the preview, fire off the renderer async if (this.isShown) { - // always clear the preview before re-rendering - this.dom.innerHTML = ""; this.container.appendChild(this.dom); void this.renderer?.(text, this.dom).catch((e) =>