# `Kotoba.MarkdownPaste`
[🔗](https://github.com/hattoriai/kotoba/blob/v0.5.0/lib/kotoba/markdown_paste.ex#L1)

The server's half of pasted Markdown: a LiveComponent that
`Kotoba.Components.kotoba/1` renders next to each editor, so an app needs
no event handler for it.

When a person pastes plain text that reads as Markdown, the editor sends
it here (`kotoba:markdown`), and the reply is the nodes that
`Kotoba.Content.from_markdown/2` builds for it, with the features of the
editor: a pasted README looks as it does on GitHub. Markdown of more than
1 MB is refused, and the editor pastes it as plain text.

# `nodes`

```elixir
@spec nodes(String.t(), %{features: [atom()], nodes: [module()]}) :: [map()] | nil
```

Returns the JSON of the nodes for pasted Markdown, with the features of
the editor (see `Kotoba.Content.from_markdown/2`), or `nil` when they do
not make a valid document.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
