Skip to content

Add a rendered markdown view toggle in the preview #165

Closed

Description

@naheel0

The preview is useful, but some users want to inspect the rendered README separately from the raw markdown source.

Proposed scope

  • Add a toggle between rendered and raw markdown views.
  • Make the active mode obvious in the preview header.
  • Preserve the current copy/download controls.

Acceptance criteria

  • Users can switch between rendered and raw output without regenerating content.
  • The toggle state updates the existing preview panel only.
  • Existing markdown sanitization continues to protect the rendered view.

Activity

  1. added
    documentationImprovements or additions to documentation
    enhancementNew feature or request
    area: frontendChanges specifically for the UI/Tailwind components.
    on May 27, 2026
  2. naheel0 commented on Aug 8, 2026

    @naheel0
    MemberAuthor

    Closing as already implemented. \MarkdownPreview.tsx\ already provides exactly this feature:

    • Toggle between rendered and raw views via the Preview / Code buttons in the preview header (\�iew\ state at src/components/Generator/MarkdownPreview.tsx:11).
    • Active mode is highlighted in the header (active button gets \�g-zinc-800 text-white, inactive \ ext-zinc-500).
    • Copy/Download controls are preserved in the header (src/components/Generator/MarkdownPreview.tsx:135-150).
    • Switching is pure client-side state \u2014 no regeneration required.
    • The rendered view remains protected by
      ehypeRaw\ +
      ehypeSanitize\ (src/components/Generator/MarkdownPreview.tsx:163).

    All acceptance criteria in this issue are satisfied on main (merged via PR #224).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: frontendChanges specifically for the UI/Tailwind components.documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions