> ## Documentation Index
> Fetch the complete documentation index at: https://docs.athelas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Snippets For Your Note

*A quick-insert tool for boiler-plate phrases in chart notes.*

## What is it?

Text Snippets adds a lightweight "/" command palette to every text-entry field in the chart-note form.

Clinicians can drop pre-saved phrases (e.g., "Shoulder: full ROM") with a click or a single **Tab** — no more re-typing the same assessment dozens of times per day.

## Using snippets inside a note

| **Action**                          | **Result**                                             |
| :---------------------------------- | :----------------------------------------------------- |
| Type `/` at the end of any sentence | Palette opens under the cursor                         |
| Continue typing                     | Live-filter by **label / group** (`/hip`, `/exam:hip`) |
| **↑ / ↓**                           | Navigate results                                       |
| **Enter / Tab / Click**             | Insert highlighted snippet                             |
| **Esc**                             | Close palette (press twice if filtering by group)      |
| **Backspace** just after `/`        | Close palette                                          |
| Type **two spaces**                 | Quick close                                            |

**Example flow**

* Type `Hip /`
* Press **↓** to highlight *"Hip: tender to palpation"*
* Press **Tab** → the phrase is inserted, the caret moves to the end, and the palette closes

## Navigating the palette

**Search bar**

* Opens automatically after `/`
* Filters across **all labels and groups**
* Prefix with `group:` to filter (e.g., `/MSK:`)

**Group → snippet drill-down**

* Selecting a group tile shows only that group's snippets
* A chip in the header shows the active group; click **"×"** to clear

**Keyboard cheat-sheet**

| **Key**                           | **Palette open**                           | **Search bar focused**      |
| :-------------------------------- | :----------------------------------------- | :-------------------------- |
| `/`                               | Re-open palette                            | —                           |
| **↑ / ↓**                         | Cycle suggestions                          | Cycle suggestions           |
| **Enter / Tab**                   | Insert snippet / open group                | Insert / open               |
| **Esc**                           | Leave group → close search → close palette | Clear group → close palette |
| **⌫** (Backspace) right after `/` | —                                          | Close palette               |

## Managing snippets (Admin & power users)

1. Navigate to **Profile → Preferences → Text Snippets**.
2. Click **"Add Snippet"** or edit an existing one.
3. Fill in:
   * **Title** (required, no `:` or double-spaces)
   * **Group** (optional, same restrictions)
   * **Snippet text** (required)
4. Click **Save**.

**Note:** The drawer closes *only after* a successful save, and inline validation errors appear if any rules are broken. The *"Other"* group always displays last.

## Tips & best practices

* **Autosize inputs**: In *Minimal* design, single-line snippet fields auto-grow.
* **Clipboard helper**: The trailing clipboard icon copies read-only field values.
* **Mobile friendly**: The palette respects virtual keyboards.
* **Accessibility**: The "/" icon is skipped in tab order; keyboard users rely on the slash.

## Troubleshooting

| **Symptom**                                | **Likely cause**                            | **Fix**                                    |
| :----------------------------------------- | :------------------------------------------ | :----------------------------------------- |
| Typing `/` does nothing                    | Text Snippets not enabled for your practice | Contact your admin to enable Text Snippets |
| Palette shows "No items match"             | No snippets, or filter too narrow           | Add snippets or clear the search / group   |
| Validation error: "Title cannot contain …" | Forbidden character in title/group          | Edit the field                             |
| Palette closes unexpectedly                | Two spaces typed or `/` deleted             | Re-type `/`                                |

### FAQ

<Accordion title="Does it work in multiline fields?">
  Yes — the palette anchors under the textarea.
</Accordion>

<Accordion title="Can sites have different snippet sets?">
  Yes. The snippet list is scoped to the **site**.
</Accordion>

<Accordion title="Is any formatting inserted?">
  No — snippets are plain text plus a trailing space.
</Accordion>
