Skip to content

Text Editor ​

Most text fields in Character Vault use a CodeMirror 6 editor — a fast, keyboard-friendly editor with AI tools built directly into the toolbar. Name and Creator are plain text boxes, and Tags uses a chip editor (see Name, Creator, and Tags).

TIP

AI toolbar operations require an AI provider to be configured. If you haven't set one up, see AI Setup.

AI Toolbar ​

A fixed toolbar sits at the top of every editor. When you select text, the AI buttons become active. Buttons run left to right in your order; when space runs out, extras collapse into ▼ More automatically. Labels longer than 12 characters are shortened (hover a button for its full name).

Select text, then click a button. Only Custom works without a selection (it writes at the cursor). ▼ More also needs a selection.

Built-in Buttons ​

The default set covers the common edits:

ButtonOperationWhat It Does
✨ EnhanceExpandElaborate on the selected text with more detail
🔄 RephraseRewriteRewrite the selection while preserving the meaning
💬 CustomInstructType your own instruction for the AI to apply
✂️ ShortenShortenCondense the selected text
📄 LengthenLengthenExtend the selection with additional content
🎨 VividVividApply vivid, descriptive language
❤️ EmotionEmotionEnhance emotional expression
🪄 FixGrammarFix grammar and improve clarity

The Custom button opens an inline text input instead of running immediately. Type your instruction, then press Enter or click the send button. It reads Rewrite when text is selected and Insert when nothing is selected (the result is written at the cursor). Press Escape or Cancel to close the box without running; what you typed is kept for next time.

Multi-line Input

All AI toolbar inputs support multi-line text. Press Shift+Enter to insert line breaks when writing detailed custom instructions.

TIP

Custom works without a selection, but then it writes new text at the cursor instead of changing existing text. To rewrite a whole field, select all first (Ctrl+A / ⌘+A).

Customizing the Toolbar ​

Open Settings in the workspace header, then the Prompts tab. The Toolbar Buttons card at the top controls which buttons appear and in what order. Remember to Save Settings when done.

  • Reorder — Use the ↑ ↓ arrows on a button to move it left or right.
  • Remove — Use the trash can to take a built-in button off the toolbar. Removed built-ins wait under Add buttons and can be put back at any time.
  • Bulk remove — Click Select, tick several buttons (or click their labels), then Remove / Delete once. One confirmation covers the whole batch.
  • Reset — Reset toolbar to defaults restores the original set and order. Asks for confirmation first.
  • Custom can't be removed — The 💬 Custom button is always kept (it shows a lock instead of a trash can), though you can move it.

Removing a button asks for confirmation: deleting a custom button is permanent, while removing a built-in just hides it.

Custom Buttons ​

Under Add buttons you can also create your own buttons via New custom button:

  1. Pick a label (up to 40 characters), an icon, and a color.
  2. Write the prompt template — it must contain ${text}, which is replaced with your selection when the button runs. Click the Selected text chip under the box to insert it.
  3. Click Add. The button lands at the end of the toolbar and its editor opens automatically.

Each custom button can use its own AI endpoint and model: expand its editor (Edit or click its label) and set Model for this prompt, the same picker the built-in prompts use. Edit the label, icon, color, or template any time the same way; delete it with the trash can (with confirmation).

Custom buttons behave like the polish operations: they need a text selection, and their results preview as ghost text with Accept / Reject exactly like the built-ins.

AI Operation Results (Ghost Preview) ​

AI suggestions appear in the editor as glowing ghost text at the exact place your selection was — a 1:1 preview of what Accept will write. The original selection is hidden for the preview and restored if you Reject. The top toolbar stays compact: status, optional thinking, and Accept / Reject.

While the AI is working

  • Ghost text streams into place (calm, dim styling while tokens arrive).
  • The editor is read-only for typing so the preview stays a clean undo step — you can still scroll and move the caret to read context.
  • A ⏹ Stop control replaces the main action buttons. Click it (or press Escape) to cancel. There is no extra ✕ while it is running.

When the suggestion is ready

  • Ghost text soft-pulses so you can tell it is ready to decide.
  • Accept / Reject appear in the slim result strip under the toolbar.
  • The strip header shows small pills for the model, time to first token (TTFT), and speed (t/s) when available.
  • If the reply hit the Max Tokens limit, a ⚠ Cut off at Max Tokens warning appears.

Accept or Reject

  • ✓ Accept (Ctrl+Enter / ⌘+Enter) — Commits the ghost text into the document at the locked range. A short success toast confirms the edit. Ctrl+Z / ⌘+Z undoes just that accept.
  • ✕ Reject (Escape) — Discards the ghost and restores your original text. Rejecting a Custom result reopens the Custom box with your instruction so you can tweak it.

While a suggestion is pending you can't type in that editor, and nothing is saved until you Accept or Reject.

Retry & recall

  • ↻ Retry — On the result strip (and on the error strip), runs the same request again.
  • Recent instructions — In an empty Custom box, press ↑ to step back through your recent instructions (the last 10 are kept). The clock button lists them; click one to reuse it, ✕ to remove it, or Clear all (click twice to confirm) to empty the list.

Preview the request

With text selected, the { } button (Preview AI request payload) shows the exact request that would be sent to the AI, without sending it.

Selection Info

When text is selected (before you run an operation), the right side of the toolbar can show a character count. If your selection is too long for the AI's context window, a warning appears and the buttons are disabled.

Reasoning

If the AI model produces reasoning (thinking) output, a collapsible Thinking fold appears in the compact result strip (same control as Orion and the Agent). It stays collapsed by default — expand it only if you want to read the thinking.

If the operation errors, a ✕ appears on the result strip to dismiss it (Escape also dismisses).

Search & Replace ​

Click the 🔍 button in the toolbar, or press Ctrl+F / Cmd+F. Press Ctrl+H (⌘+Alt+F on Mac) to open it with Replace ready.

  • Find — Type in the search field. Matches are highlighted in the editor.
  • Navigate — Use the ^ and v buttons (or Enter / Shift+Enter) to jump between matches. F3 / Shift+F3 and Ctrl+G / Shift+Ctrl+G also step through matches.
  • Replace — Type a replacement string and use Replace (current match) or Replace All. Pressing Enter in the Replace box replaces the current match.
  • Options — Toggle Aa (case-sensitive), ab (whole word), or .* (regular expression).
  • Match counter — Shows the current match index and total count (e.g., "3/12").
  • Close — Press Escape or click ×.

If you have text selected when opening search (up to 100 characters), it automatically fills the search field.

Font Size ​

Click the aA button in the toolbar to open a font size slider.

  • Drag the slider to adjust size (6px – 32px, default 16px). Text resizes live while you drag and is saved when you let go.
  • The size applies to every editor, including Greetings and Lorebook entries.
  • Reset (16px) returns to the default.
  • Shortcuts: Ctrl+= / ⌘+= and Ctrl+- / ⌘+- step the size up or down; Ctrl+0 / ⌘+0 resets it.
  • The slider popup closes when you click outside it.

Normalize HTML Entities ​

Click the ;& button in the toolbar to normalize HTML entities into readable characters.

  • If text is selected, only the selection is normalized.
  • If nothing is selected, the whole editor document is normalized.
  • Useful when imported cards contain text like  , &, ", or numeric entities.

TIP

This is available in every text editor that uses the shared CodeMirror toolbar, including standard fields, Greetings, Lorebook entry content, Creator Notes, and Extensions.

Editor Features ​

  • Spellcheck — A custom in-editor spellchecker (Hunspell-backed) underlines misspellings and offers quick-fix suggestions. Toggle on/off and pick the language from Character Workspace → Spellcheck in Settings. The English dictionary is fetched from /dictionary/en.{aff,dic} on first use and cached in IndexedDB for offline access. Hover or focus over a flagged word to see suggestions plus "Ignore word" and "Add to dictionary".
  • Name macros — and are syntax-colored so they stand out while you write (case-insensitive; optional spaces inside the braces). Recolor them under Character Workspace → Name macros in Settings.
  • Macro auto-convert — Typing char or user as a word turns it into or . On by default; press Backspace right after to keep the plain word. See Name macros.
  • Roleplay colors — "dialogue", narration, and *actions* get distinct colors in every prose editor. Customize under Character Workspace → Roleplay colors in Settings.
  • Markdown image links — Image syntax is highlighted; Ctrl+click to open is controlled under Settings → Character Workspace → Editor links.
  • Undo/Redo — Standard Ctrl+Z / Ctrl+Shift+Z support.
  • Line wrapping — Long lines wrap automatically.
  • Theme sync — The editor follows the app's dark/light mode.
  • Auto-save — Changes are saved as you type. The character workspace header shows Saving…, Saved, Unsaved, or Save failed. A failed save stays local and retries on the next change. Press Ctrl+S / ⌘+S to flush pending saves immediately (including a lorebook draft) instead of the browser’s Save Page dialog.
  • Live counts — Section headers show characters, words, and an estimated token count as you type (same byte-based estimator as the AI context panel).

Markdown image syntax such as ![alt](https://example.com/art.png) is highlighted in every shared text editor.

  • Highlight — Always on so image marks and URLs are easy to spot.
  • Ctrl+click to open — When Settings → Character Workspace → Editor links → Open Markdown image links with Ctrl+click is enabled (it is on by default), Ctrl+click (⌘+click on Mac) an openable http/https URL, or tap it on a touch screen. A Leaving CharacterVault warning appears, then the link opens in a new tab.
  • Edit without opening — A plain click places the cursor, so you can edit the URL like any other text.
  • Spellcheck-friendly — Image constructs are skipped by spellcheck so URLs and alt text don’t pile up wavy underlines.

Name macros ​

and (and spaced forms like ) get distinct colors in the editor. Matching is case-insensitive so and highlight the same way.

They follow the theme by default. To override one, open Settings → Character Workspace → Name macros, pick a color with the picker or type a hex value. Clear the field (back to auto) to return to automatic.

Auto-convert is on by default. Typing char or user as a whole word writes or . It is case-insensitive, so User becomes too. It runs when you type a space, punctuation, Enter, or Tab after the word, and when the editor loses focus. It works in every editor, including Creator Notes and Extensions JSON.

Press Backspace right after a conversion to keep the plain word instead. To turn it off, clear Turn typed char and user into macros under Settings → Character Workspace → Name macros.

Roleplay colors ​

Prose editors color-code roleplay text so dialogue, narration, and actions are easy to tell apart. Coloring is on by default in every prose editor. Turn it off with Color dialogue, narration, and actions under Settings → Character Workspace → Roleplay colors.

  • Dialogue — Text in "double quotes" (straight or curly). Defaults to amber.
  • Narration — Plain prose outside quotes and asterisks. Follows the editor text color unless you pick one.
  • Actions — Text in single *asterisks*. Defaults to gray. **bold** markers are never treated as actions, and unclosed quotes stay narration.

Change the colors under Settings → Character Workspace → Roleplay colors: each row has a color picker and a hex field, plus a live preview and a Reset to default colors button. and always keep their macro colors, even inside quotes.

Spellcheck ​

The shared editor runs a Hunspell-backed spellchecker — the same engine LibreOffice and most browsers use. It's enabled by default for every section that uses the shared toolbar: Description, Personality, Scenario, Greetings, Lorebook entry content, Creator Notes, and Extensions.

How it works:

  • Underlines — Misspelled words get a wavy red underline. Hovering shows a tooltip with up to eight suggestions, plus Ignore word and Add to dictionary.
  • Language-aware in technical sections — Creator Notes (HTML) and Extensions (JSON) automatically skip technical tokens that aren't prose: HTML element names, attribute names, attribute values, and JSON property keys (e.g. full_path, class="sora-preview"). The text between tags and the JSON string values are still checked.
  • Affix-aware — running, ran, and runs all pass without you needing to whitelist anything.
  • Hyphenated compounds — Words like well-known pass when each segment is a valid dictionary word.
  • Smart ignores — The checker automatically skips ``` code fences, inline `code` spans, placeholders, Markdown image constructs, HTML tags, URLs/emails, numeric tokens, and ALL-CAPS acronyms. Add more words to your ignored or personal dictionary lists from the tooltip; they persist in your settings and apply across all cards. There is currently no screen to review or remove these words.
  • Debounced + viewport-only — Only the visible portion of large lorebooks is checked, so editing stays fast.
  • Offline — The English Hunspell dictionary is fetched once on first use and cached in IndexedDB for subsequent visits.

Toggle or switch language in Settings → Character Workspace → Spellcheck. Only English (en-US) is available today.

Section Layout ​

Each section tab shows a title, description, and the editor. Some sections have special layouts:

SectionLayout
Name and CreatorSimple text fields for quick edits
TagsTag chips with quick add, paste, and remove controls
Description, Personality, Scenario, etc.Standard single editor
Creator NotesEditor with a Preview CSS button that opens a sandboxed preview. Add to Editor inside the preview switches to a split view (not on phones). See Creator Notes Preview.
GreetingsSpecial multi-greeting editor. Duplicate and reorder from the sidebar. See Greetings Editor.
LorebookTwo-panel editor with ST fields, recursion map, search, and AI key generation. Same UI for embedded books and the Lorebook Vault. See Lorebook Editor.
ImageImage upload panel (not a text editor)
ExtensionsJSON editor with validation. The JSON must be an object ({ ... }). Invalid JSON shows a warning and is not saved; empty JSON writes {}.

Name, Creator, and Tags ​

Some short fields use simpler editors instead of the full writing toolbar:

  • Name — Type the character name directly.
  • Creator — Type the creator name directly.
  • Tags — Add tags with Enter, commas, or paste. Remove a tag with its x button.

Tags are cleaned up as you add them. Empty tags are ignored, extra spaces are removed, and duplicates are skipped.

Customizing AI Operation Prompts ​

All built-in toolbar operation prompts are customizable, and each one can optionally use a different AI endpoint and model than your global AI Config selection. Custom buttons you create carry their own prompt template, edited from the button itself (see Custom Buttons).

  1. Open Settings in the workspace header.
  2. Go to the Prompts tab.
  3. Expand an operation, edit the template, and (optionally) set Model for this prompt.
  4. Click Save Settings.

Required Placeholders ​

Prompts must include certain placeholders to work. The system validates these before saving. Chips under each prompt (Selected text, Your instruction) insert a placeholder at the cursor, or select it if the prompt already has it, and turn red when a required one is missing.

PlaceholderUsed InPurpose
${text}All operations, including custom buttonsThe selected text
${instruction}Custom onlyThe custom instruction text

What is a placeholder?

A placeholder is a special token that gets replaced with actual content before the prompt is sent to the AI provider.

Example: In the template Enhance the following text: ${text}, the placeholder is replaced with your selection when you click Enhance.

Primary prompts (Enhance, Rephrase) need ${text}. Polish prompts (Shorten, Lengthen, Vivid, Emotion, Fix) also need ${text}. Custom button prompts need ${text} as well — validated when the button is created and on save.

Custom is special — it needs both ${instruction} and ${text}. When text is selected, your template is used. When nothing is selected, the system swaps in a generation template instead, and the result is inserted at the cursor.

How Custom works without a selection

When nothing is selected, the system swaps the entire prompt template for a generation-oriented one. This lets the Custom button work both as a text modifier and a text generator.

Default Custom template (with a selection):

Please apply the following instruction to the text below:

Instruction: ${instruction}

Text:
"""
${text}
"""

Provide only the modified text without any additional commentary.

When nothing is selected, the template is replaced entirely:

Please generate text based on the following instruction:

Instruction: <your instruction>

Provide only the generated text without any additional commentary.

Not yet customizable

The no-selection prompt is currently hardcoded and cannot be edited in the Prompts tab. Customization for this prompt is planned for a future release.

Don't worry if you forget — you can't save a prompt without the required placeholders. An error message will remind you to include them.

Per-operation model routing ​

By default every toolbar op uses the model from Settings → AI Config. You can override that per prompt:

  1. Expand a prompt (e.g. Fix).
  2. Under Model for this prompt, change Endpoint from Default (AI Config) to Nano-GPT, Synthetic, OpenRouter, Minimax, LM Studio / localhost, or a custom URL that already has a key on AI Config.
  3. Choose a model from the sheet, Fetch models for that endpoint, or type a model ID.
  4. Save settings.

Collapsed headers show → model-id when a mapping is active.

OperationMapping key
Enhanceexpand
Rephraserewrite
Custominstruct (also used by lorebook AI key generation)
Shorten / Lengthen / Vivid / Emotion / Fixmatching polish op
Your custom buttonsset in each button's editor, same picker

Not overridden by these mappings: Orion chat and AI Creation Studio always use the global AI Config model. Streaming, reasoning, and sampler settings stay global.

Full setup notes: AI Setup → Prompts Tab.

Next Steps ​

Privacy