Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Fix the bug where note revisions cannot be previewed.#1392

Merged
eliandoran merged 1 commit intodevelopfrom
Note_Revisions
Mar 11, 2025
Merged

Fix the bug where note revisions cannot be previewed.#1392
eliandoran merged 1 commit intodevelopfrom
Note_Revisions

Conversation

@SiriusXT
Copy link
Copy Markdown
Member

@SiriusXT SiriusXT commented Mar 11, 2025

Related to [https://github.com/TriliumNext/Trilium/issues/5556], enabling Canvas and Mind Map previews.

The main change is replacing .html() with .prop("outerHTML").

Reason: <img> is a self-closing tag with no child elements, so .html() returns empty, which prevents the preview.

The .html() method was introduced during the conversion from .js to .ts, leading to the bug: 8f6376e.

Copy link
Copy Markdown
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@eliandoran eliandoran merged commit 971b388 into develop Mar 11, 2025
5 checks passed
@eliandoran eliandoran deleted the Note_Revisions branch March 11, 2025 11:39
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants