# dev.knotless.renderMarkdown

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

Markdown as this appview's pages show it once posted, for a preview of what is being written.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.renderMarkdown)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.renderMarkdown/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.renderMarkdown/examples)

## Definitions

### `dev.knotless.renderMarkdown`

**Type**: `procedure`

Renders Markdown to HTML with the renderer the pages draw comments, issue and pull bodies with: raw HTML shown as text, bare web addresses made links, and relative links resolved inside the repository. Reads and fetches nothing, and needs no login. A procedure rather than a query, since the text may be long.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `repo` | `string` (at-uri) | No | The dev.knotless.repo record of the repository it is written in, as dev.knotless.getThread takes it: relative links resolve inside it. Without it, they resolve from the site's root. |
| `text` | `string` | Yes | The Markdown, as long as a comment's or a body's may be. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `html` | `string` | Yes | The HTML, as dev.knotless.getThread's comments carry it. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Renders Markdown to HTML with the renderer the pages draw comments, issue and pull bodies with: raw HTML shown as text, bare web addresses made links, and relative links resolved inside the repository. Reads and fetches nothing, and needs no login. A procedure rather than a query, since the text may be long.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "repo": {
              "description": "The dev.knotless.repo record of the repository it is written in, as dev.knotless.getThread takes it: relative links resolve inside it. Without it, they resolve from the site's root.",
              "format": "at-uri",
              "type": "string"
            },
            "text": {
              "description": "The Markdown, as long as a comment's or a body's may be.",
              "maxLength": 20000,
              "type": "string"
            }
          },
          "required": [
            "text"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "html": {
              "description": "The HTML, as dev.knotless.getThread's comments carry it.",
              "type": "string"
            }
          },
          "required": [
            "html"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Markdown as this appview's pages show it once posted, for a preview of what is being written.",
  "id": "dev.knotless.renderMarkdown",
  "lexicon": 1
}
```
