---
title: Working with Content
description: Create, edit, and manage content in the EmDash admin dashboard.
---

import { Aside, Steps, Tabs, TabItem } from "@astrojs/starlight/components";

This guide covers how to create, edit, and manage content using the EmDash admin dashboard.

## Accessing the Admin

Open your browser to `/_emdash/admin` on your site. Log in with the credentials you created during setup.

The dashboard displays:

- **Sidebar** - Navigation to collections, media, and settings
- **Content list** - Entries in the selected collection
- **Quick actions** - Create new content, bulk operations

## Creating Content

1. Click a collection name in the sidebar (e.g., **Posts**)

2. Click **New Post** (or the equivalent for your collection)

3. Fill in the required fields:
   - **Title** - The content's display name
   - **Slug** - URL identifier (auto-generated from title, editable)

4. Add content using the rich text editor

5. Set metadata in the sidebar:
   - **Status** - Draft, Published, or Archived
   - **Publication date** - When to publish
   - **Categories and tags** - Taxonomy assignments

6. Click **Save**

<Aside>
	Drafts are only visible in the admin. Change status to **Published** to make content visible on
	your site.
</Aside>

## Content Statuses

Every entry has one of three statuses:

| Status        | Visibility | Use case         |
| ------------- | ---------- | ---------------- |
| **Draft**     | Admin only | Work in progress |
| **Published** | Public     | Live content     |
| **Archived**  | Admin only | Retired content  |

Change status using the dropdown in the editor sidebar.

## The Rich Text Editor

EmDash's editor supports:

- **Headings** - H2 through H6
- **Formatting** - Bold, italic, underline, strikethrough
- **Lists** - Ordered and unordered
- **Links** - Internal and external
- **Images** - Insert from media library
- **Code blocks** - With syntax highlighting
- **Embeds** - YouTube, Vimeo, Twitter
- **Sections** - Reusable content blocks via `/section` command

### Slash Commands

Type `/` to access quick insert commands:

| Command                      | Action                              |
| ---------------------------- | ----------------------------------- |
| `/section`                   | Insert a reusable section           |
| `/image`                     | Insert an image from media library  |
| `/code`                      | Insert a code block                 |

### Keyboard Shortcuts

| Action | Shortcut               |
| ------ | ---------------------- |
| Bold   | `Ctrl/Cmd + B`         |
| Italic | `Ctrl/Cmd + I`         |
| Link   | `Ctrl/Cmd + K`         |
| Undo   | `Ctrl/Cmd + Z`         |
| Redo   | `Ctrl/Cmd + Shift + Z` |
| Save   | `Ctrl/Cmd + S`         |

### Inserting Images

1. Click the image button in the toolbar

2. Select an existing image from the media library, or upload a new one

3. Add alt text (required for accessibility)

4. Adjust alignment and size options

5. Click **Insert**

## Editing Content

1. Navigate to the collection containing the content

2. Click on the entry you want to edit

3. Make your changes

4. Click **Save**

Changes to published content appear immediately on your site. No rebuild required.

### Revision History

EmDash tracks changes to content. Access revision history from the editor sidebar:

1. Click **Revisions** in the editor sidebar

2. View the list of previous versions with timestamps

3. Click a revision to preview it

4. Click **Restore** to revert to that version

<Aside type="caution">
	Restoring a revision creates a new revision with the restored content. The original revision
	history is preserved.
</Aside>

## Bulk Operations

Perform actions on multiple entries at once:

1. Use the checkboxes to select entries in the content list

2. Click the **Bulk Actions** dropdown

3. Select an action:
   - **Publish** - Set all selected to published
   - **Archive** - Set all selected to archived
   - **Delete** - Permanently remove selected

4. Confirm the action

## Searching and Filtering

### Search

Use the search box to find content by title or content. Search is case-insensitive and matches partial words.

### Filters

Filter the content list by:

- **Status** - Draft, Published, Archived
- **Date range** - Created or modified dates
- **Author** - Who created the content
- **Taxonomy** - Category or tag assignments

Click **Clear Filters** to reset.

## Scheduling Content

Schedule content to publish at a future date:

1. Create or edit content

2. Set status to **Draft**

3. Set the **Publication date** to a future date and time

4. Click **Save**

When the publication date arrives, the content automatically becomes published.

<Aside type="tip">
	Scheduled publishing requires your site to be server-rendered or have a scheduled task that checks
	for pending publications.
</Aside>

## Deleting Content

Delete content from the edit screen or content list:

### From the Editor

1. Open the content you want to delete

2. Click **Delete** in the toolbar

3. Confirm the deletion

### From the List

1. Select entries using checkboxes

2. Click **Bulk Actions** > **Delete**

3. Confirm the deletion

<Aside type="caution">
	Deleted content is permanently removed and cannot be recovered. Consider archiving instead if you
	might need the content later.
</Aside>

## Content API

For programmatic access, use the EmDash admin API:

### Create Content

```bash
POST /_emdash/api/content/posts
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN

{
  "title": "My New Post",
  "slug": "my-new-post",
  "content": "<p>Post content here</p>",
  "status": "draft"
}
```

### Update Content

```bash
PUT /_emdash/api/content/posts/my-new-post
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN

{
  "title": "Updated Title",
  "status": "published"
}
```

### Delete Content

```bash
DELETE /_emdash/api/content/posts/my-new-post
Authorization: Bearer YOUR_API_TOKEN
```

## Translating Content

When [i18n is enabled](/guides/internationalization/), you can create translations of any content entry.

### Creating a translation

1. Open the content entry you want to translate

2. In the editor sidebar, find the **Translations** panel

3. Click **Translate** next to the target locale

4. Edit the pre-filled content — adjust the title, slug, and body for the new language

5. Click **Save**

The new translation is linked to the original entry and starts as a draft. Publish it independently when the translation is ready.

### Switching between translations

The Translations panel shows all configured locales. Click **Edit** next to any existing translation to navigate to it directly. The current locale is marked with a checkmark.

### Locale filter

In the content list, use the locale dropdown in the toolbar to filter entries by language. Each entry shows its locale in a dedicated column.

<Aside type="tip">
  Each translation has its own slug, status, and revision history. Publish, schedule, and manage translations independently.
</Aside>

See the [Internationalization guide](/guides/internationalization/) for full details on configuration, querying, and the language switcher.

## Next Steps

- [Querying Content](/guides/querying-content/) - Retrieve content in your templates
- [Media Library](/guides/media-library/) - Upload and manage files
- [Taxonomies](/guides/taxonomies/) - Organize content with categories and tags
- [Internationalization](/guides/internationalization/) - Multilingual content and translations
