mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-26 11:12:53 +00:00
Adds the pdf-panel and markdown-panel examples, the File panels section of the plugin reference, and an e2e spec that installs both examples, opens a PDF in the browser viewer, and edits Markdown through Paseo's document across the switcher, Source, autosave and conflicts.
23 lines
1.0 KiB
Markdown
23 lines
1.0 KiB
Markdown
# Markdown file panel example
|
|
|
|
Requires Paseo 0.13.0 or later. Install the editor dependencies, then install this directory:
|
|
|
|
```sh
|
|
cd plugin-examples/markdown-panel
|
|
npm install
|
|
paseo plugin install "$PWD"
|
|
```
|
|
|
|
Open a `.md` or `.markdown` file in Files. Choose **Rich Markdown — markdown-panel** in the
|
|
picker. Check **Don't ask me again** to remember the choice on this device.
|
|
|
|
The panel is a CodeMirror editor with Markdown highlighting, line numbers, undo, redo, and line
|
|
wrapping. Edits call the host document's `setText`; Paseo owns autosave, the dirty dot, and
|
|
external-change conflicts. The bar's switcher still offers Paseo's Markdown and Source panels. Files above 1 MiB or hosts
|
|
without editing support render read-only. Native shows selectable, read-only text.
|
|
|
|
Paseo bundles the editor dependencies into this plugin. They are loaded only on web; the native
|
|
path uses React Native primitives. DOM integration lives in `client/web.ts`.
|
|
|
|
See the [file panel reference](https://paseo.sh/docs/plugins/reference#file-panels).
|