Feature tour

Every feature,
explained.

A guided tour of everything TAEditor puts in the toolbar — from the formatting basics to KaTeX math, image upload, and a code-editor Tab — and the safety and compatibility work that happens behind the scenes.

Try it live Read the docs

See it for yourself

This is a full editor with every feature switched on. Format text, drop in an image, add a table, or insert an equation.

Rich-text formatting

The formatting tools users expect

Every inline control is one click (or one shortcut) away, and each button reflects the current selection so you always know what's active.

  • Bold, italic, underline, strikethrough — semantic <strong>, <em>, <u>, <s>
  • Inline code wraps the selection in <code>
  • Highlight toggles a <mark> chip
  • Text color opens a 12-swatch palette plus a custom picker, with a one-click Remove
  • Superscript & subscript for footnotes, formulas, and units

Toolbar

B I U S </> H A x₂

A bold claim, an italic aside, an underline, and some cut text. Inline code() stays monospace, highlights pop, and E = mc2 needs a superscript.

Headings & block styles

Structure with a single dropdown

The block style menu switches the current block between paragraph and heading levels — its label always tracks whatever block the cursor sits in.

  • Paragraph, Heading, Sub heading from the dropdown; h1h6 are available as individual toolbar buttons too
  • Blockquote converts the block to <blockquote>
  • Horizontal rule drops a <hr> divider

Rendered output

Heading

Sub heading

A normal paragraph of body text, sitting under the headings it belongs to.

A blockquote for the parts worth pulling out.

Text alignment

Left, center, right, justify

Set the alignment on any block — and because images are aligned through their parent block, the same buttons reposition images, too.

  • Applies to the whole selected block (or every block in a multi-line selection)
  • Centering an image is just select & align center

Alignment

Left-aligned line.

Centered line.

Right-aligned line.

Lists

Bullets, numbers, and nesting

Toggle bullet or ordered lists from the toolbar, then shape them with the keyboard the way you'd expect.

  • Markdown shortcuts — type * , - , or 1. then Enter to start a list
  • Tab / Shift+Tab nest and outdent the current item
  • Enter on an empty item steps out a level, then exits to a paragraph

Nested list

  1. First step
    • A nested detail
    • Another, pressed Tab to nest
  2. Second step
  3. Third step
Image upload

Upload your way — then resize & crop

Insert images by file or by URL. By default they're embedded as base64 (works fully offline); point TAEditor at an endpoint or hand it an async handler when you want them hosted.

  • Base64 by default — no backend required
  • POST to an endpoint via uploadUrl
  • Async handler for S3, signed URLs, or any custom flow
  • Auto-compression for oversize files instead of rejection
  • Drag-resize from the corners and crop in place

Three upload modes

// 1. base64 (default) — nothing to configure
TAEditor.create('#editor');

// 2. POST to your endpoint
TAEditor.create('#editor', {
  image: { uploadUrl: '/api/upload' }
});

// 3. async handler (S3, signed URLs…)
TAEditor.create('#editor', {
  image: {
    uploadHandler: async (file) => {
      const url = await putToS3(file);
      return url;
    }
  }
});
Tables

Build and edit tables inline

Insert an N×M table, then manage it directly: each cell has a context menu to add or remove rows and columns, and Tab walks you through the grid.

  • In-cell menu for add / remove row & column
  • Tab moves to the next cell — and adds a row at the end
  • Shift+Tab moves to the previous cell

Sample table

FeatureOutput
Bold<strong>
Highlight<mark>
Code block<pre><code>
Math equations

KaTeX math, fully round-trippable

Write LaTeX with a live preview, or pull from a searchable library of 200+ presets across 14 topics. The LaTeX source is stored on the element, so saving and re-loading a document is lossless.

  • Live preview as you type
  • 200+ preset library spanning algebra, calculus, statistics, and more
  • Round-trippable — the source LaTeX never gets lost
  • KaTeX is loaded by you, only when the math button is used

Live preview

e^{i\pi} + 1 = 0
Code blocks

A real code-editor Tab

Convert a block to <pre><code> and the editor behaves like a code editor inside it — Tab inserts a real tab or indents the selection, Shift+Tab outdents.

  • Tab inserts \t, or indents every selected line
  • Shift+Tab outdents the current or selected lines
  • Enter twice on a blank trailing line exits the block

Inside a code block

function greet(name) {
	if (name) {
		return `Hi, ${name}`;
	}
	return 'Hi there';
}
Keyboard shortcuts

Keep your hands on the keyboard

The shortcuts that matter for fast editing, all built in.

KeyEffect
Ctrl/Cmd + BBold
Ctrl/Cmd + IItalic
Ctrl/Cmd + UUnderline
Tab / Shift+Tab (list)Nest / outdent the current item
Tab / Shift+Tab (table)Move to next / previous cell (adds a row at the end)
Tab / Shift+Tab (code)Indent / outdent line(s)
Enter (empty list item)Outdent a level, then exit the list
* / - / 1. then EnterStart a bullet or ordered list
Ctrl/Cmd + Enter (math dialog)Insert the equation
Escape (any dialog)Cancel
Safety & clean output

XSS-safe, with one-click cleanup

A built-in sanitizer runs on every paste and on load, stripping anything that could execute. And the clear format button resets a messy selection back to clean text.

  • Strips <script>, inline on* handlers, and javascript: URLs
  • Runs on paste and on setData / load
  • Clear format removes inline styling but preserves block style and math embeds

Sanitized on paste

// pasted in…
<img src=x onerror=alert(1)>
<a href="javascript:steal()">click</a>
<script>evil()</script>

// …stored as
<img src=x>
<a>click</a>
Framework-neutral

Drops into the stack you already have

All CSS is namespaced under .ta-editor and the editor guards against framework quirks, so it coexists with whatever you're running.

  • Tailwind — preflight defended against where it would damage content
  • Alpine / Vuex-ignore / v-pre on the root keep them off the contenteditable subtree
  • HTMX — auto-cleanup on swap via MutationObserver
  • jQuery, Bootstrap — synced textarea and dialogs that sit above modals

Open the compatibility test page

Configurable toolbar

// full editor (default toolbar)
TAEditor.create('#post');

// minimal comment box
TAEditor.create('#comment', {
  toolbar: ['bold', 'italic', 'link',
    'bulletList']
});

Ready to try every feature?

Open the playground — no install, no signup.

Open live playground Read the docs