component · authoring

TuxRichTextEditor

Tiptap-based WYSIWYG editor — canonical TUX rich-text surface. Sister to TuxMarkdownEditor for the rendered-only case. Feature set mirrors the docs.it.tamu.edu admin-center editor so consumers across the TTI stack (Landscape, tti-ai-studio, internal CMS surfaces) can adopt one shared editor with one shared chrome.

flagship · full feature set

Seven toolbar groups + source mode + full-screen

Format · Headings (H1–H4) · Lists (bullet · numbered · task) · Block (quote · code · rule) · Media (link · image) · Table (insert + manipulate when in-table) · Mode (WYSIWYG ↔ raw HTML source). Plus undo / redo, full-screen, and word count.

Try: Click Source to view the raw HTML, edit it, click WYSIWYG to see your changes rendered. The pre-seeded content already exercises a task list, table, and Python code block (with syntax highlighting via lowlight). Press ⌘S to emit the save event.

0 words · 0 chars
<tux-rich-text-editor
  v-model="html"
  placeholder="Start writing…"
  @update="onUpdate"
  @save="onSave"
  @mode-change="onModeChange"
  @fullscreen-change="onFullscreenChange"
/>

events: save count = 0 · mode = wysiwyg · fullscreen = false

density · trimmed

Inline comment field

Pass a subset of toolbar groups via :toolbar, zero out :heading-levels, hide the word count and full-screen for tight contexts.

<tux-rich-text-editor
  v-model="html"
  :toolbar="['format', 'lists', 'media']"
  :heading-levels="[]"
  min-height="6rem"
  max-height="14rem"
  :show-count="false"
  :fullscreenable="false"
  placeholder="What changed?"
/>

minimal

Source-mode only chrome

Three buttons (bold · italic · underline + the mode toggle) for surfaces where the user mostly wants a textarea with the occasional formatting tag.

0 words · 0 chars
<tux-rich-text-editor
  v-model="html"
  :toolbar="['format', 'mode']"
  :heading-levels="[]"
  min-height="5rem"
  placeholder="Add a note…"
/>

feature inventory

What ships

  • Inline marks: bold, italic, underline, strikethrough, inline code
  • Headings: H1 · H2 · H3 · H4 (configurable per consumer)
  • Lists: bullet, numbered, task (checkable, nestable)
  • Blocks: blockquote, code block (with lowlight syntax highlighting), horizontal rule
  • Media: link (⌘K prompt, brand-color rendering), image (URL + alt prompt, base64 allowed)
  • Tables: insert 3×3 with header row; add / remove columns and rows; resizable column widths; delete table
  • Mode toggle: WYSIWYG ↔ raw HTML source textarea — edits in either view round-trip cleanly
  • Full-screen: overlay mode (Esc exits); useful for long-form drafting
  • Word / character count: live footer; pure DOM-text count, ignores tags
  • Save event: ⌘S / Ctrl+S emits save — host wires to persist
  • Typography substitutions: smart quotes, em dashes, ellipses (Tiptap Typography extension)
  • Undo / redo: with disabled-state derived from editor.can()

why this is the canonical surface

One editor across the stack

The feature set mirrors the TipTapEditor component in docs-tti-tamu-edu/nuxt-site/app/components/ so the same chrome can land in Landscape's draft surfaces, tti-ai-studio's chat composition, and the docs platform's admin center — without each consumer maintaining its own Tiptap wrapper. Things the docs editor does that this one defers to a follow-on:

  • Markdown ↔ HTML round-trip — needs turndown + a markdown parser; defer until a consumer surface stores markdown rather than HTML. The :sourceFormat prop is the planned extension point.
  • YAML frontmatter preservation — coupled to the markdown round-trip above.
  • Slash-command palette — Tiptap supports via extension-mention; defer to a follow-on if AI-studio chat composition adopts it.