> For the complete documentation index, see [llms.txt](https://docs.realmacsoftware.com/elements-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmacsoftware.com/elements-docs/elements-language/component/language/markdown.md).

# @markdown

The `@markdown` directive creates an editable Markdown text area within your component. Users can write content using Markdown syntax, which is automatically converted to HTML when the page is rendered.

## Syntax

```html
@markdown(name: "content", title: "Content")
```

Or using positional parameters:

```html
@markdown("content", title: "Content")
```

## Parameters

| Parameter | Required | Description                                                          |
| --------- | -------- | -------------------------------------------------------------------- |
| `name`    | Yes      | A unique identifier for the Markdown area within the component       |
| `title`   | No       | The label displayed in the editor interface                          |
| `default` | No       | Default Markdown content to display when no content has been entered |

## Examples

### Basic Markdown Area

```html
@markdown(name: "content", title: "Content")
```

### With Default Content

Provide helpful default content that guides users on how to use the Markdown editor:

```html
@markdown("content", title: "Markdown", default: "## Markdown

Right-click on this text and choose *Edit Markdown* from the contextual menu to show the Markdown editor.

Learn more in the [Markdown docs](https://docs.realmacsoftware.com/elements-docs/elements-app/components/built-in-components/markdown).")
```

### Article Body

```html
<article class="prose">
    @markdown("body", title: "Article Content", default: "## Getting Started

Write your article content here using **Markdown** syntax.

- Lists are supported
- As are *emphasis* and **strong** text
- And [links](https://example.com)")
</article>
```

## Markdown Features

The Markdown editor supports standard Markdown syntax including:

* **Headings** (`#`, `##`, `###`, etc.)
* **Emphasis** (`*italic*`, `**bold**`)
* **Lists** (ordered and unordered)
* **Links** (`[text](url)`)
* **Images** (`![alt](src)`)
* **Code blocks** (fenced with triple backticks)
* **Blockquotes** (`>`)
* **Horizontal rules** (`---`)

## Editor Integration

Users can access the Markdown editor by right-clicking on the Markdown area in the Elements editor and selecting "Edit Markdown" from the contextual menu. This opens a dedicated Markdown editing interface.

## Related

* [@text](/elements-docs/elements-language/component/language/text.md) - For simple plain text editing
* [@richtext](/elements-docs/elements-language/component/language/richtext.md) - For styled text with Typography support


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.realmacsoftware.com/elements-docs/elements-language/component/language/markdown.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
