Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions site/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions src/commonmark/plugins/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down