# Writing, embeds and attachments

> Slash commands, embedding any link — a map, a song, a page — and how pictures and documents look in a note and in its Markdown file.

Source: https://papyra.app/docs/writing/

Everything you add to a note is plain Markdown in its file. This page covers the
quick ways to add things, and what each one writes.

## Slash commands

Type `/` at the start of a line (or after a space) and a menu of blocks opens
under the caret — or above it, near the bottom of the note. Keep typing to
filter it; arrow keys move, <kbd>Enter</kbd> inserts, <kbd>Esc</kbd> closes.

| Type | To add |
| --- | --- |
| `/h1`, `/h2`, `/h3` | A heading |
| `/bullet`, `/numbered`, `/check` | A list or a checklist |
| `/quote`, `/code`, `/table`, `/rule` | A quote, a code block, a table, a divider |
| `/image` | A picture from a link |
| `/embed` | Any link: a map, video, song, document or web page |
| `/youtube` | A YouTube video |
| `/media` | Upload a picture, recording or video |
| `/link`, `/date` | Link another note, insert today's date |

The menu always fits inside the note: it scrolls when there are more commands
than room.

## Embedding a link

**Insert → Embed a link** (or `/embed`) takes the link you already have. You
don't need to hunt for an "embed URL":

- **Maps** — a Google Maps link (a place, a search, directions, or a
  `maps.app.goo.gl` share link) shows that place on a map. An **Apple Maps**
  share link (`maps.apple/p/…` or `maps.apple.com/…`) shows the same place too,
  and so does an OpenStreetMap link. A dropped pin opens at street level.
- **Video and music** — YouTube, Vimeo, Loom, Dailymotion, TikTok, Twitch,
  Spotify and SoundCloud links play in the note, at their player's own shape.
- **Work** — Google Docs, Sheets, Slides and Drive files, Figma, Miro, Canva,
  CodePen and CodeSandbox links show their live preview (to anyone the file is
  shared with — a private Google Doc asks the reader to sign in).
- **Any other page** is shown in place when the site allows it. Many sites
  refuse to be shown inside another one; for those, Papyra adds a **link card**
  instead (the page's title, summary and picture) and tells you so.

Short links are followed and pages are checked by **your** server, through the
same guarded fetcher as link previews: public addresses only, nothing on your
network.

Click an embed to select it. Its toolbar aligns it, moves it a block up or
down, removes it, and edits its caption (and, for a map or video, its link).
Drag its edge to resize it. The toolbar always stays in view: above or below
the embed, or inside it near the bottom of a long note. Rest the pointer on
any embed and a preview of its page appears beside it (the video's own page,
the place in Maps); click the preview to open the page. A link card works the
same way: a click selects it rather than following it, and its preview (or
<kbd>Ctrl</kbd>/<kbd>⌘</kbd>-click) opens it.
Make a card narrower and it tidies itself: a shorter summary and a smaller
picture, then just the title. Size, alignment and caption are saved with it:

```markdown
![[iframe:https://www.google.com/maps?q=Nikkawahama+Beach&output=embed|640x400]] <!-- align:right -->
![[card:https://example.com/post|Example post|480]] <!-- align:left --> <!-- caption:Worth a read -->
```

## Moving things around

Press on a picture, an attachment, a document, a link card or an embed and
drag it up or down. A line shows where it will land, and the note scrolls when
you drag near its top or bottom. <kbd>Esc</kbd> cancels, and <kbd>Ctrl</kbd>+<kbd>Z</kbd> undoes the move.
Videos, recordings and a map you're using move by the small grip beside
their top-left corner (the grip also works on a phone). Text isn't moved this way. From the keyboard,
select the item and use **Move up** / **Move down** in its toolbar.

## Pictures

Drop, paste or upload a picture and it appears straight away — the upload shows
its progress over the picture itself, and the picture never blinks out while the
stored copy loads. A picture from a link shows a soft loading frame until it
arrives, and a small card with **Retry** if it can't.

Size and alignment are part of the file:

```markdown
![[beach.jpg|640]] <!-- align:center --> <!-- caption:The beach at dusk -->
![A gif|240](https://media.example.com/party.gif) <!-- align:right -->
```

## Documents

A PDF, a spreadsheet, a slide deck, an archive — any file that isn't a picture
or a recording — sits in the note like it does on your desktop: its icon and its
name. Click it once and its toolbar appears beside it: what it is and how big,
then **Preview** (PDFs open in your browser's viewer; text, CSV and code files as
text), **Rename**, **Download**, **Replace** or move it. Double-click to open it
— a file the browser can't show (a Word or Excel file) opens in a new tab, where
your browser downloads it.

**Rename** changes only the name shown in the note — the file keeps its stored
name, and the name you chose is its alias in the Markdown:

```markdown
![[q3-report-411e00.pdf|Q3 report]]
```

A new upload is shown under the name it had on your computer.
