Skip to content

feat(web): add a View Source toggle to the resource preview for markdown/CSV/HTML #1552

Description

@cliffhall

The ContentViewer renders markdown (react-markdown), CSV (table), and HTML (sandboxed iframe) resources in a way that hides the underlying text. Add a "View Source" button at the bottom of the resource preview panel (left of Refresh) that swaps the rendered preview for the raw resource text, labeled "View Rendered" while in source mode.

Scope: markdown, CSV, HTML only (JSON/XML/CSS already show their source-ish syntax-highlighted text; PDF/images/audio have no meaningful text source). The toggle resets to the rendered view when the previewed resource changes.

Follow-up to #1329 / #1551.

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions