# Keeping structure when importing Markdown

Import drafts while preserving headings, lists, and code blocks.

## Implementation

Extract a leading H1 and store the body as Markdown so the source stays editable.

## Try it

Import a file with a title, a list, and a code block, then verify that the preview links to each heading.

```js
const html = markdown.render(source);
```

- **Topic** — Markdown
- **Reading time** — 6 min
- [Read the reference](<https://github.com/markdown-it/markdown-it>)
