---
title: Export to HTML
slug: export
summary: Save the document you are reading as one HTML file that opens in any web browser, with its pictures inside it.
---

# Export to HTML

Sashmark is in development. Nothing has been released yet, and there is no public build. This page describes the development build. Planned items: https://www.sashmark.com/roadmap.

You can save the document you are reading as one HTML file. The file opens in any web browser, with no other files needed. Your Markdown file does not change.

## How to export

1. Open the file you want to export.
2. Pick one:
   - **Mac and Linux:** the menu **File > Export > HTML…**
   - **Any system:** open the command palette (Cmd + Shift + P on Mac, Ctrl + Shift + P on Windows and Linux) and pick **Export to HTML…**
3. The save box opens in the document's folder, with the name `<file name>.html` filled in. Pick a place and a name that ends in `.html` (or `.htm`), then save.

When the file is written, the top bar says **Exported** and the file's name, for example **Exported Doe notes.html**. Cancel in the save box writes nothing and says nothing.

Export works on an open file. A temporary New Tab with no file has nothing to export.

## What is in the HTML file

- **What you see, including unsaved edits.** The HTML holds the text that Save would write now, so edits you have not saved yet are in it. Exporting does not save your Markdown file, and it does not change your edits or what Undo takes back.
- **Headings, text, lists, quotes, rules, code blocks, links and pictures.**
- **Pictures from your computer are inside the file.** A picture that Sashmark can't load or show is a box with its alt text and only its file name, such as `doe-photo.png`. The folder it was in is left out, so the HTML does not show where your files are.
- **Web pictures are not loaded.** Each one is the line "Web image not loaded:" and its address, as on screen.
- **Always the light look.** The file uses the light colours, even when the app is dark.
- **Code blocks are plain monospace text**, with no colours.
- **Rare symbols written as character codes keep their characters.** For example, a symbol written as `&#xE000;` appears as that character in the HTML.

## What is left out or changed

- **Wiki links are plain text.** A link like `[[notes|Summary]]` shows as "Summary", not as a link. Brackets you escaped with a backslash, as in `\[[notes]]`, stay as typed: `[[notes]]`, including in documents that contain many rare symbols. A rare exception remains: in a document containing all 6,400 private-use characters, a wiki-link label beside the same character can cause that pair of characters to be left out of the HTML.
- **Links to other files stay as written.** A link to `notes.md` points to `notes.md` next to the HTML file. It works only if that file is there and your browser can open it. Web links (`http`, `https`) and email links (`mailto`) work as usual.
- **Links that could run code lose their target.** A link such as `javascript:` keeps its text but goes nowhere.
- **Links to network shares and absolute paths lose their target.** A link that starts with `/` or `\`, such as `//doe-host/share` or `\\doe-host\share`, keeps its text but goes nowhere, so the HTML file never opens a shared folder over the network.
- **HTML typed into the Markdown shows as text.** For example, `<b>Doe</b>` appears as those characters, not as bold.
- **No scripts.** The file holds no script, and it tells the browser not to load anything from the web.

## When export can't finish

The top bar says why, in one line, and your edits stay as they are:

- **Couldn't export: the name must end in .html.** Export writes only a name that ends in `.html` or `.htm`, so it can never replace a Markdown file.
- **Couldn't export: that file is open in Sashmark; pick another name.** Export never replaces a file that is open in a tab or a window.
- **Couldn't export: that is this Markdown file; pick another name.** The name you picked leads to the Markdown file itself, for example through a link. Sashmark never replaces it with HTML.
- **Couldn't export: that folder is gone.** The folder was moved or removed while the save box was open.
- **Couldn't export:** and the reason Save gives, when Save would refuse the text too. See Editing and saving a file.
- **Couldn't export:** and a plain reason, such as a full disk, when the file can't be written.

If a file with the same name is already there, your system's save box usually asks first. When the export goes ahead, the new HTML replaces it in one step, so a failed export never leaves half a file.
