Editra documentation

Core features

Configure a focused editing surface or expose the complete Word-like document toolkit.

Toolbar and menus

Toolbar tokens and menu configuration determine what users see. Plugins not required by the configuration remain lazy.

const editor = await Editra.init({
  selector: "#editra-editor",
  plugins: ["bold", "italic", "underline", "formatting"],
  toolbar: "bold italic underline | foreColor highlighter"
});

Text formatting

Bold

Emphasize strong terms and labels.

Open demo →

Italic

Add emphasis, titles, or a distinct voice.

Open demo →

Underline

Mark text with a familiar underline treatment.

Open demo →

Strikethrough

Retain context while marking content obsolete.

Open demo →

Commands

Toolbar and menu actions converge on executeCommand(), so external application controls can invoke the same behaviors.

const editor = await Editra.init({ selector: "#editra-editor" });
await editor.executeCommand("bold");
await editor.executeCommand("setFontSize", "14px");
await editor.executeCommand("setAlignment", "center");