Grooper Help - Version 25.0
25.0.0047 2,266

Markdown Viewer

Content Viewer GrooperReview.DocView

Displays a markdown document.

Remarks

Overview

The Markdown Viewer control displays and allows editing of markdown documents within the Grooper web interface. It provides a dual-mode interface for viewing rendered HTML or editing the markdown source, supporting both read-only and editable scenarios.

UI Components

  • Title Bar:
    • Shows the document type ("Markdown Document") and the current document title.
    • Contains action buttons: {save}, {cancel} (when editing is allowed), and {source} for toggling between HTML and markdown source views.
  • Content Area:
    • HTML View: Displays the rendered markdown as HTML for easy reading.
    • Markdown Source View: Presents a Code Editor for editing the raw markdown text, with syntax highlighting and editing features.
    • Only one view is visible at a time; users toggle between them using the {source} button.

Interactive Features

  • Toggle Source/HTML:
    • Use the {source} button to switch between the rendered HTML and markdown source editor.
    • If there are unsaved changes in the editor, toggling is disabled until changes are saved or canceled.
  • Editing and Saving:
    • When not in read-only mode, users can edit the markdown source in the Code Editor.
    • The {save} button commits changes, while the {cancel} button discards unsaved edits and reloads the original content.
    • The control tracks unsaved changes and enables/disables buttons accordingly.
  • Keyboard and Accessibility:
    • The Code Editor supports keyboard navigation, shortcuts, and context menu commands for efficient editing.
    • All major actions are accessible via mouse or keyboard.

Usage Guidance

Use the Markdown Viewer to review or edit markdown documents attached to batch folders or other content items. Toggle between the HTML and source views as needed. When editing, remember to save or cancel changes before switching views or navigating away.

  • In read-only mode, only the rendered HTML and {source} toggle are available.
  • In editable mode, use the {save} and {cancel} buttons to manage changes.
  • The Code Editor provides syntax highlighting and editing tools for markdown.

Example

The following diagram illustrates the layout and major UI elements of the Markdown Viewer control:

┌──────────────────────────────────────────────────────────────────────────┐
│ Markdown Document                {save} {cancel} | {source}              │
│ ──────────────────────────────────────────────────────────────────────── │
│ {Title}                                                                  │
│ ──────────────────────────────────────────────────────────────────────── │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ Rendered HTML View (default)                                         │ │
│ │   - Shows formatted markdown content                                 │ │
│ │   - Toggle to source view with {source}                              │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ Markdown Source Editor (when {source} is active)                     │ │
│ │   - Code Editor with markdown syntax highlighting                  │ │
│ │   - Edit, save ({save}), or cancel ({cancel}) changes                │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────┘
  • {save}, {cancel}, and {source} refer to the action buttons in the title bar.
  • Only one of the HTML view or source editor is visible at a time.
  • The Code Editor provides advanced editing features for markdown content.

For more information, see the documentation for Code Editor and related controls.

Command Buttons

ButtonShortcut KeySummary
save save

Child Controls

NameTypeSummary

Used By

Notification