# Special Viewers

*Lx* can show more than editable text. It chooses a viewer from the detected format and your settings.

In most viewers and previews, press **Space** to move down one page or **Shift+Space** to move up one page.

## Markdown

Markdown files normally open as a rendered preview.

Use links, scroll normally, and zoom with `+`, `-`, or `0`.

To edit the source by default:

```lua
config.format_modes.md = "edit"
```

## Images

Supported raster and SVG files open in the Image Viewer.

Use the mouse wheel or `+` and `-` to zoom. Drag with the left or middle mouse button to pan.

To force an extensionless JPEG:

```cli
lx --format jpeg --handler image --view photo
```

## ANSI art

ANSI art uses the `dos` format and the `ansiart` preview handler.

*Lx* looks for ANSI control codes and older CP437-style text. Ordinary CP437 text is not automatically treated as art.

ANSI art is centered when it fits in the pane. Press **Space** to start or gently stop automatic scrolling. It slows down at each end, pauses, and then returns in the other direction. **Shift+Space** moves up one page.

To force the preview:

```cli
lx --format dos --preview artwork.txt
```

## Fonts

TrueType and OpenType fonts open in a read-only preview with font details, character samples, and several sizes.

Use `+`, `-`, or `0` to zoom.

To force an extensionless TrueType font:

```cli
lx --format ttf --preview fontfile
```

## Office documents

Supported Word and Excel files offer these choices:

- Preview as Markdown
- Extract text
- Extract TSV for spreadsheets
- View binary
- Cancel

Extraction creates a new generated document. The original Office file is not changed.
Modern and older embedded DOCX images fit the available preview space and stay beside related text without creating separate image files. Their `lx:` links refer to images kept inside the source document.
Aligned code in DOCX files becomes preformatted Markdown instead of losing its indentation and columns.

You can request extraction from the command line:

```cli
lx --extract report.docx
```

## Bytes and hex

Bytes and hex work with any file:

```cli
lx --bytes archive.bin
lx --hex archive.bin
```

These viewers are read-only. They also work with generated results after extraction or unpacking.

## When a preview is unavailable

Preview falls back to a read-only text view. *Lx* does not silently make the file editable.

See [Opening files](opening_files.md) for defaults and per-format choices.
