# 82editor documentation (v1.4.0) > A light, free (MIT) WYSIWYG HTML editor for Korean sites. Zero dependencies, IME-safe Korean input, clean paste from Word, Google Docs and Hangul (HWP). Summary: https://82editor.com/llms.txt --- # Getting started > Put 82editor into a write form in five minutes. Source: https://82editor.com/en/docs/getting-started/ 82editor is a dependency-free JavaScript editor. A PHP or JSP board without a build step needs two CDN lines; an npm project needs one package. No license key, no sign-up, no payment. ## From the CDN The quickest path. Keep your existing ` ``` ## From npm ```sh npm i @82editor/core ``` ```js import { createEditor } from '@82editor/core'; import '@82editor/core/styles.css'; const editor = createEditor('#editor', { placeholder: 'Write something', toolbar: 'board', height: 400, }); editor.on('change', (html) => console.log(html)); ``` ## Reading and writing content ```js const html = editor.getHTML(); // HTML to save editor.setHTML('

Loaded post

'); editor.getText(); // plain text editor.isEmpty(); // nothing written yet? ``` > Sanitize the HTML again on your server before saving it: requests that skip the browser can contain anything. See [Security](https://82editor.com/en/docs/security/). ## Next - [All options](https://82editor.com/en/docs/options/) - [Customize the toolbar](https://82editor.com/en/docs/toolbar/) - [Upload images to your server](https://82editor.com/en/docs/image-upload/) - [React](https://82editor.com/en/docs/react/) · [Vue](https://82editor.com/en/docs/vue/) · [Svelte](https://82editor.com/en/docs/svelte/) · [Angular](https://82editor.com/en/docs/angular/) --- # CDN files > Pinned and latest URLs, and what each file is. Source: https://82editor.com/en/docs/cdn/ 82editor.com serves the files itself. Versioned URLs never change, so browsers cache them for a year. Use them on production sites. | File | What it is | | --- | --- | | `/cdn/v1.4.0/82editor.min.js` | For a script tag. Defines the global `Editor82`. | | `/cdn/v1.4.0/82editor.esm.js` | A single ES module for ` ``` > You may also download the files and host them yourself. It is MIT licensed: change and redistribute freely. --- # Textarea and forms > Upgrade an existing form without touching the server. Source: https://82editor.com/en/docs/textarea-form/ Pass a ` ``` - Whatever the textarea already holds becomes the initial content (edit screens). - The browser cannot run `required` on the editor; check `isEmpty()` as above. - `editor.destroy()` shows the textarea again with the latest HTML. --- # Headings > The paragraph format menu and shortcuts for headings 1-4. Source: https://82editor.com/en/docs/headings/ Turn paragraphs into headings to break up a long post. They are saved as `

`-`

`, so search engines and screen readers see the structure. ```js createEditor('#editor', { toolbar: 'heading | bold italic | bulletList', }); ``` ## How to change a paragraph - The `heading` menu offers Paragraph, Heading 1, Heading 2, Heading 3 and Quote. Its label shows the format at the caret. - `Ctrl`+`Alt`+`1`-`4` for headings 1-4, `Ctrl`+`Alt`+`0` for a paragraph. Pressing the same heading key again turns it back into a paragraph. - At the start of an empty line, type `# ` to `#### ` ([Markdown input](https://82editor.com/en/docs/markdown/)). - `Backspace` at the very start of a heading turns it into a paragraph and keeps the text. - `Enter` at the end of a heading starts a normal paragraph. Heading 4 is not in the menu: use the shortcut or Markdown input. A selection over several paragraphs changes them all. Headings also work inside list items and table cells. ## Presets and phones `heading` is on the first row of the `basic`, `board` (default) and `full` presets, not in `minimal`. It is near the front of the phone toolbar too. ## Saved HTML ```html

Getting here

Put the caret …

Opening hours

``` Inserting a table of contents (`toc`) gives headings an `id`; see [Bookmarks and TOC](https://82editor.com/en/docs/bookmarks/). The `a11y` check points out skipped levels, such as a heading 4 straight after a heading 2. ## API ```js editor.exec('h2'); // heading 2 (again: back to paragraph) editor.exec('paragraph'); editor.exec('block', 'h3'); // what the menu runs ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `heading` | toolbar item | — | Paragraph format menu: paragraph, headings 1-3, quote | | `markdownShortcuts` | boolean | `true` | Typing `# ` makes a heading. `false` turns it off. | --- # Fonts, sizes, line height > Font, size (pt or px) and line-height menus, and their lists. Source: https://82editor.com/en/docs/fonts/ Change the font and size of selected text, and the line height of paragraphs. The menu lists can be replaced to fit your site. ```js createEditor('#editor', { toolbar: 'fontFamily fontSize lineHeight | bold', fontSizes: [10, 12, 14, 18, 24], fontSizeUnit: 'px', }); ``` ## Font (fontFamily) The default list is Pretendard, Malgun Gothic, NanumGothic, NanumMyeongjo, Gulim, Dotum, Batang, Gungsuh, Arial, Georgia, Times New Roman and Courier New. "Default font" at the top removes the font. Each `fontFamilies` entry is `'Menu label=CSS font-family'`. Without `=`, the first family name is the label. ```js createEditor('#editor', { fontFamilies: [ 'Body=Inter, sans-serif', 'Serif=Merriweather, Georgia, serif', 'Courier New, monospace', // label "Courier New" ], }); ``` > The editor does not load web fonts. Fonts readers may not have installed must be loaded as web fonts on your view page too. ## Size (fontSize) The default list is 8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28 and 36, in `pt` (familiar to Korean word-processor users). Set `fontSizeUnit: 'px'` for pixels. Where no size is set, the box shows the rendered size in that unit. ## Line height (lineHeight) Line height applies to whole paragraphs. The defaults are 100, 130, 150, 160, 180, 200 and 250 (%); "Default" removes it. ## With nothing selected Picking a font or size with no selection applies it to what you type next. ## Presets - `board` (default): `fontSize` on the first row; `fontFamily` and `lineHeight` under ⋯ more - `full`: all three on the first row - `basic`, `minimal`: none ## Saved HTML ```html

18px text Georgia

``` To match the editing area to your view page, use `contentStyle` ([Content style](https://82editor.com/en/docs/content-style/)). ## API ```js editor.exec('fontSize', '14pt'); editor.exec('fontFamily', 'Georgia, serif'); editor.exec('lineHeight', '160%'); editor.exec('fontSize', ''); // remove ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `fontFamily` | toolbar item | — | Font menu | | `fontSize` | toolbar item | — | Size menu | | `lineHeight` | toolbar item | — | Line height menu (per paragraph) | | `fontFamilies` | string[] | 12 Korean-first fonts | `'Label=CSS'` or a CSS value | | `fontSizes` | number[] | `[8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 36]` | Numbers in the size menu | | `fontSizeUnit` | `'pt' \| 'px'` | `'pt'` | Size unit | | `lineHeights` | number[] | `[100, 130, 150, 160, 180, 200, 250]` | Percent values in the line height menu | --- # Bold, italic, underline > Bold, italic, underline, strikethrough, sub/superscript, inline code. Source: https://82editor.com/en/docs/text-styles/ The basic text format buttons. Select text and press one, or press it first and keep typing. Press again to turn it off. ```js createEditor('#editor', { toolbar: 'bold italic underline strike | subscript superscript code', }); ``` ## Buttons and shortcuts | Toolbar name | Format | Shortcut | Saved as | | --- | --- | --- | --- | | `bold` | Bold | `Ctrl`+`B` | `` | | `italic` | Italic | `Ctrl`+`I` | `` | | `underline` | Underline | `Ctrl`+`U` | `` | | `strike` | Strikethrough | `Ctrl`+`Shift`+`X` | `` | | `subscript` | Subscript | `Ctrl`+`,` | `` | | `superscript` | Superscript | `Ctrl`+`.` | `` | | `code` | Inline code | `Ctrl`+`E` | `` | On macOS use `⌘`. Buttons show as pressed when the caret is inside that format. Pressing `code` inside inline code removes it. Markdown-style typing works too: `**bold**`, `*italic*`, `~~strike~~`, ``code`` ([Markdown input](https://82editor.com/en/docs/markdown/)). ## Presets and the selection toolbar - `board` (default): bold, underline, strikethrough on the first row; italic and sub/superscript under ⋯ more. No inline code. - `full`: bold, italic, underline, strikethrough on the first row; sub/superscript and inline code under more - `basic`: bold, italic, underline, strikethrough. `minimal`: bold, italic, underline - On phones only bold is on the main row; the rest is under ⋯. The toolbar that pops up over a selection ([bubble toolbar](https://82editor.com/en/docs/bubble-toolbar/)) also has bold, italic, underline, strikethrough and inline code, even when the main toolbar doesn't. ## Saved HTML Browser-made ``, `` and `` are saved as ``, `` and ``. ```html

Bold, italic, underline, strikethrough, H2O, npm install

``` ## API ```js editor.exec('bold'); editor.queryState('bold'); // true when the caret is in bold text ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `bold` `italic` `underline` `strike` | toolbar item | — | Bold, italic, underline, strikethrough | | `subscript` `superscript` | toolbar item | — | Subscript, superscript | | `code` | toolbar item | — | Inline code (multi-line: [code blocks](https://82editor.com/en/docs/code-blocks/)) | | `bubbleToolbar` | boolean | `true` | Format toolbar over a selection | | `markdownShortcuts` | boolean | `true` | Typing rules such as `**bold**` | --- # Text and highlight colors > Text color, highlight, custom palettes, recent and custom colors. Source: https://82editor.com/en/docs/colors/ `color` sets the text color, `highlight` the background behind the text, like a marker pen. Use them to make a key sentence stand out. ```js createEditor('#editor', { toolbar: 'bold | color highlight', colors: ['#000000', '#e03131', '#1c7ed6', '#2b8a3e', '#f08c00'], }); ``` ## The palette - "Automatic" (text) or "None" (highlight) at the top removes the color. - Colors you use appear in a "Recent" row, up to 8 (kept in this browser's localStorage). - "Custom" takes a hex code like `#1c7ed6` or opens the system color picker. - The bar under the toolbar button shows the color at the caret. The `colors` option replaces the text color palette with your site colors. The same list is used for table cell backgrounds. The highlight button uses its own 13 marker colors. ## Presets and phones `color` and `highlight` are on the first row of `basic`, `board` and `full`. On phones the text color is on the main row and highlight is under ⋯. Both are also in the [selection toolbar](https://82editor.com/en/docs/bubble-toolbar/). ## Saved HTML Colors are saved as `` with a `style`. Browsers may write hex colors as `rgb()`. ```html October 31 Late papers … ``` > Black text may be hard to read on a dark view page. Use colors sparingly, and don't let color alone carry the meaning: add bold or similar too. ## API ```js editor.exec('color', '#e03131'); editor.exec('highlight', '#fff3bf'); editor.exec('color', ''); // remove ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `color` | toolbar item | — | Text color | | `highlight` | toolbar item | — | Highlight (background) color | | `colors` | string[] | 13 built-in colors | Colors for the text color and table cell palettes (CSS colors) | --- # Alignment and indent > Left, center, right and justify, the align menu, indent and outdent. Source: https://82editor.com/en/docs/alignment/ Center or right-align paragraphs and add or remove space in front of them. Alignment applies to whole paragraphs, not to words. ```js createEditor('#editor', { toolbar: 'alignMenu | alignLeft alignCenter alignRight alignJustify | indent outdent', }); ``` ## Alignment | Toolbar name | Action | Shortcut | | --- | --- | --- | | `alignLeft` | Align left (removes alignment) | `Ctrl`+`Shift`+`L` | | `alignCenter` | Center | `Ctrl`+`Shift`+`E` | | `alignRight` | Align right | `Ctrl`+`Shift`+`R` | | `alignJustify` | Justify | `Ctrl`+`Shift`+`J` | | `alignMenu` | All four in one menu button | — | | `alignCenterToggle` | One button that switches center and left | — | With an image selected, left, center and right align the image instead of the paragraph ([Images](https://82editor.com/en/docs/images/)). ## Indent and outdent - `indent` / `outdent`, shortcuts `Ctrl`+`]` / `Ctrl`+`[` - Normal paragraphs get 40px more or less left margin per step. - In a list, the item moves into or out of a nested list. `Tab` / `Shift`+`Tab` do the same in lists. - Table cells are not indented. ## Presets and phones - `board` (default) and `basic`: `alignMenu` on the first row; in `board`, indent and outdent are under ⋯ more - `full`: four align buttons plus indent and outdent on the first row - The phone toolbar shows a single `alignCenterToggle` button to save room. ## Saved HTML ```html

Centered

Right

Indented

``` ## API ```js editor.exec('alignCenter'); editor.exec('align', 'justify'); // what the menu runs: left | center | right | justify editor.exec('indent'); ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `alignLeft` `alignCenter` `alignRight` `alignJustify` | toolbar item | — | Align buttons | | `alignMenu` | toolbar item | — | Align menu (one button) | | `alignCenterToggle` | toolbar item | — | Toggle centering | | `indent` `outdent` | toolbar item | — | Indent, outdent | --- # Lists > Bulleted and numbered lists, nesting, and list styles like a. b. c. Source: https://82editor.com/en/docs/lists/ Bulleted and numbered lists for listing things. The `listStyle` menu changes the markers to a. b. c., i. ii. iii., Korean 가. 나. 다. and more. ```js createEditor('#editor', { toolbar: 'bulletList orderedList listStyle | indent outdent', }); ``` ## Making lists - `bulletList` `Ctrl`+`Shift`+`8`, `orderedList` `Ctrl`+`Shift`+`7`. Press again to remove the list. - At the start of an empty line, type `- `, `* ` or `+ ` for bullets, `1. ` or `1) ` for numbers. - `Tab` nests an item one level deeper, `Shift`+`Tab` moves it out. The `indent` / `outdent` buttons do the same. - `Enter` on an empty item ends the list. ## List style (listStyle) Choices: ● disc, ○ circle, ■ square, 1. 2. 3., 01. 02., a. b. c., A. B. C., i. ii. iii., I. II. III., 가. 나. 다., ㄱ. ㄴ. ㄷ. A numbered style on a bulleted list turns it into a numbered list and the other way round. Outside a list, it starts a new list in that style. `listMenu` puts bullets, numbers and checklist into one menu button, for narrow toolbars. ## Presets and phones - `bulletList` `orderedList`: first row of `minimal`, `basic`, `board` and `full` - `listStyle`: only under ⋯ more in `full` - On phones bullets are on the main row; numbered lists are under ⋯. ## Saved HTML The default markers (disc, 1. 2. 3.) are saved without a style; others use `list-style-type`. If your view page CSS resets `list-style`, the markers may not show. ```html
  • ID card
  • Photo
    • 3×4 cm
  1. Fill in the form
``` ## API ```js editor.exec('bulletList'); editor.exec('listStyle', 'lower-alpha'); ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `bulletList` | toolbar item | — | Bulleted list | | `orderedList` | toolbar item | — | Numbered list | | `listStyle` | toolbar item | — | List style menu | | `listMenu` | toolbar item | — | Bullets, numbers and checklist in one menu | | `markdownShortcuts` | boolean | `true` | Typing `- ` or `1. ` starts a list | For to-do lists see [Checklists](https://82editor.com/en/docs/checklists/). --- # Checklists > To-do lists with boxes you click, and showing them on your view page. Source: https://82editor.com/en/docs/checklists/ A list with a box in front of each item, for packing lists, to-dos and check items. Click a box to tick it; ticked items turn grey and get crossed out. ```js createEditor('#editor', { toolbar: 'checklist bulletList orderedList', }); ``` ## Making and ticking - The `checklist` button or `Ctrl`+`Shift`+`9`. Inside a bulleted list it turns that list into a checklist; press again to go back. - At the start of an empty line, `[ ] ` starts an empty box and `[x] ` a ticked one. - Click the box at the left of an item to tick or untick it. This can be undone like any edit. - New items made with `Enter` start unticked. - In read-only mode the boxes don't change. ## Presets On the first row of `full`, under ⋯ more in `board` (default), not in `basic` or `minimal`. Also in the `listMenu` menu. ## Saved HTML ```html
  • Book the meeting room
  • Send the slides
``` The boxes are drawn with CSS. Load `82editor.css` on your view page and give the element around the post `class="e82-view"` to get the same boxes, or draw them yourself: ```css ul[data-checklist] { list-style: none; padding-left: 4px; } ul[data-checklist] > li::before { content: '☐ '; } ul[data-checklist] > li[data-checked='true']::before { content: '☑ '; } ul[data-checklist] > li[data-checked='true'] { color: #6e7781; text-decoration: line-through; } ``` > When you sanitize again on the server, allow `data-checklist` on `ul` and `data-checked` on `li` ([Security](https://82editor.com/en/docs/security/)). As Markdown, items come out as `- [x] Book the meeting room`. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `checklist` | toolbar item | — | Make or remove a checklist | | `listMenu` | toolbar item | — | Bullets, numbers and checklist menu | | `markdownShortcuts` | boolean | `true` | Typing rules `[ ] ` and `[x] ` | --- # Links > Add, edit and remove links; new tab, nofollow and linkRel. Source: https://82editor.com/en/docs/links/ Attach an address to text or an image. The link dialog also lets you open it in a new tab and tell search engines not to follow it (nofollow). ```js createEditor('#editor', { toolbar: 'bold | link unlink', linkRel: 'ugc', }); ``` ## Adding a link - Select text and press the `link` button or `Ctrl`+`K`. With nothing selected, the dialog also asks for the text to show (empty: the address is used). - An address without a scheme like `example.com` gets `https://`; `name@example.com` becomes a `mailto:` link. - Unsafe addresses such as `javascript:` are refused with a message. - The address box suggests bookmarks in the post (places with an `id`) for `#bookmark` links ([Bookmarks and TOC](https://82editor.com/en/docs/bookmarks/)). - Addresses typed in the text become links after a space or `Enter` ([auto link](https://82editor.com/en/docs/auto-replace/)). A pasted address becomes a link too. ## New tab and nofollow "Open in a new tab" adds `target="_blank"` with `rel="noopener noreferrer"`. The nofollow checkbox adds `nofollow` to `rel`. `sponsored` and `ugc` set elsewhere are kept. ## rel on every link (linkRel) For boards written by visitors, set `linkRel: 'nofollow ugc'`. `getHTML()` adds it to every `http(s)` link. Only `nofollow`, `sponsored` and `ugc` are accepted; the content being edited is not changed. ## Editing and removing - With the caret in a link, a small bar shows the address plus open, edit and remove buttons. - `Ctrl`+click opens a link in a new tab; `#bookmark` links jump to that spot in the post. - `unlink`: with just a caret it removes the whole link; with a selection, only the selected part. The text stays. - Selecting an image and adding a link makes the whole image a link ([Images](https://82editor.com/en/docs/images/)). ## Presets and phones `link` is on the first row of every preset and of the phone toolbar. `unlink` is in no preset: the link bar and the dialog have remove buttons. The [selection toolbar](https://82editor.com/en/docs/bubble-toolbar/) has a link button too. ## Saved HTML ```html 82editor home page new tab + nofollow 82editor home page ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `link` | toolbar item | — | Open the link dialog | | `unlink` | toolbar item | — | Remove a link | | `linkRel` | string | none | rel added to every http(s) link on output: `nofollow` `sponsored` `ugc` | | `autoLink` | boolean | `true` | Typed addresses become links | --- # Clear and copy formatting > Clear formatting, the format painter, and changing letter case. Source: https://82editor.com/en/docs/format-tools/ Strip formatting from text that came from somewhere else, or copy the look of one spot onto another. ```js createEditor('#editor', { toolbar: 'bold color | clearFormat formatPainter caseChange', }); ``` ## Clear formatting (clearFormat) Removes bold, italic, underline, strikethrough, sub/superscript, inline code, text and highlight colors, font and size from the selection. Shortcut `Ctrl`+`\`. Links and paragraph formats such as headings, alignment and lists stay; code blocks are left alone. It needs a selection. ## Format painter (formatPainter) - Put the caret in the text whose look you want and press `formatPainter`. A short message confirms the copy. - Drag over the target text, or select it with `Shift`+arrow keys: its formatting is cleared and the copied one applied. - Copied: bold, italic, underline, strikethrough, sub/superscript, text color, highlight, size and font. Paragraph formats like alignment or line height are not. - It applies once. Press the button again or `Esc` to cancel before applying. ## Letter case (caseChange) Turns the selected text into UPPERCASE, lowercase or Title Case. ## Presets - `board` (default): `clearFormat` at the end of the first row, `formatPainter` under ⋯ more, no `caseChange` - `full`: all three under more - The [selection toolbar](https://82editor.com/en/docs/bubble-toolbar/) has clear formatting too. Text pasted from Word or HWP is already cleaned on paste. For plain text, paste with `Ctrl`+`Shift`+`V` ([Paste cleanup](https://82editor.com/en/docs/paste/)). ## API ```js editor.exec('clearFormat'); editor.exec('caseChange', 'upper'); // upper | lower | title editor.exec('formatPainter'); ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `clearFormat` | toolbar item | — | Clear formatting from the selection | | `formatPainter` | toolbar item | — | Copy formatting and paint it once | | `caseChange` | toolbar item | — | Letter case menu | --- # Symbols, emoji, date > Symbol table, searchable emoji picker, and inserting the current date. Source: https://82editor.com/en/docs/special-chars/ Insert symbols that are not on the keyboard (※ ★ ① ㎡ ₩), emoji, and the current date and time. ```js createEditor('#editor', { toolbar: 'specialChars emoji datetime', }); ``` ## Symbols (specialChars) A tabbed table: symbols, arrows, math, currency, circled and parenthesized characters (① ⑴ ㉠), units (㎏ ㎡ ℃), Korean jamo, and Greek/Latin. ## Emoji (emoji) Seven tabs (smileys, people and hands, nature, food, activities, objects, symbols) and a search box that takes English or Korean words. ## Date and time (datetime) Inserts the date and time at the moment you press it, formatted for the editor language, e.g. `October 21, 2026 at 03:20 PM` in English. ## Presets In `board` (default) and `full`, all three are under ⋯ more. Not in `basic` or `minimal`. ## Saved HTML All three insert plain characters, not images or tags. Emoji look a little different on each reader's device. ```html

※ Notice ★ Floor 1, area 33㎡ 🎉

``` > Some replacements happen while typing, such as `(c)` → © and `->` → →. See [Auto replace](https://82editor.com/en/docs/auto-replace/). ## API ```js editor.exec('datetime'); editor.insertText('※'); ``` ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `specialChars` | toolbar item | — | Symbol table | | `emoji` | toolbar item | — | Emoji picker with search | | `datetime` | toolbar item | — | Insert the current date and time | --- # Tables > Insert tables, add and delete rows and columns, merge cells, header rows, cell colors, column widths. Source: https://82editor.com/en/docs/tables/ For price lists, schedules and comparisons. Pick a size from the table button, then put the caret in the table to get its editing bar above it. ```js createEditor('#editor', { toolbar: 'heading | bold color | table | undo redo', }); ``` ## Inserting a table - The `table` button opens a 10 × 10 grid. Hover to choose the size and click. From the keyboard, use the arrow keys and `Enter`. - On an empty line, type `/` and pick "Table" for a 3 × 3 table ([Slash menu](https://82editor.com/en/docs/slash-menu/)). - Tables copied from Excel, HWP or Word keep their structure, merged cells included ([Paste cleanup](https://82editor.com/en/docs/paste/)). ## The table bar With the caret in a table, a bar shows above it. From the left: | Button | What it does | | --- | --- | | Insert row above / below | Adds an empty row. A merged cell that spans across it grows by one. | | Insert column left / right | Adds an empty column next to the caret. | | Delete row / Delete column | Deletes the rows or columns of the caret (or of the selected cells). Deleting all of them removes the table. | | Merge cells | Merges two or more selected cells. Their text is joined with line breaks. | | Split cell | Splits a merged cell back into its cells. The text stays in the first one. | | Header row | Turns the first row into `` header cells (gray, bold), or back. | | Cell color | Background of the selected cells (or the caret cell). Includes none, custom and recent colors. | | Borders | 1px, 2px, 3px or none, for the selected cells or the whole table. Cells without borders show a dashed guide only while editing. | | Vertical align | Top, middle or bottom. | | Delete table | Removes the table and leaves an empty paragraph. | ## Selecting and moving - Drag from one cell to another to select a rectangle of cells. Merged cells widen the rectangle as needed. - `Tab` moves to the next cell, `Shift`+`Tab` to the previous one. `Tab` in the last cell adds a row. - Point at the right edge of a cell and drag to resize the column (30px minimum). On the first drag every column is fixed at its current width, so only the dragged one changes. ## Saved HTML The look is stored as inline styles, so the table looks the same on a page without any extra CSS. ```html
……
Plan
Basic
``` The outer `div[data-table-wrap]` comes from `responsiveOutput` (on by default): on narrow phone screens the table scrolls sideways instead of overflowing the page. It is taken off again when the HTML is loaded back into the editor. ## From code Every button on the table bar is an `editor.exec()` command, so your own buttons and shortcuts can do the same. ```js editor.exec('insertTable', '4x3'); // 4 rows, 3 columns editor.exec('rowBelow'); // rowAbove, colLeft, colRight editor.exec('deleteRow'); // deleteCol, deleteTable editor.exec('mergeCells'); // splitCell editor.exec('headerRow'); editor.exec('cellColor', '#fff3bf'); // '' removes the color editor.exec('cellVAlign', 'middle'); // top | middle | bottom editor.exec('tableBorder', '0'); // 0 | 1 | 2 | 3 (px) ``` ## Presets and phones The `table` button is on the first row of the `basic`, `board` (default) and `full` presets, not in `minimal`. On phones the default `board` toolbar keeps one row of essentials, so the table button moves under ⋯. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `table` | toolbar item | - | Insert a table (10 × 10 size grid) | | `colors` | string[] | 20 cell colors | When set, both the text color palette and the cell color palette use this list. Unset, cells get their own palette of mostly light colors. | | `responsiveOutput` | boolean | true | Wrap saved tables in a sideways-scrolling box. `false` saves the bare table. | --- # Quotes > Block quotes and four quote styles: side line, quotation marks, gray box, bordered box. Source: https://82editor.com/en/docs/quotes/ For quoting someone, or to make one paragraph stand out. Picking a look from the `quoteStyle` menu makes a quote and styles it in one step. ```js createEditor('#editor', { toolbar: 'heading | bold | blockquote quoteStyle | undo redo', }); ``` ## Making a quote - The `blockquote` button or `Ctrl`+`Shift`+`B` wraps the paragraph at the caret (or the selected paragraphs) in a quote. Again to remove it. - Type `>` and a space at the start of a paragraph (`markdownShortcuts`). - The `heading` dropdown has "Quote" too. - `Enter` on an empty last line leaves the quote. `Backspace` on an empty first line removes it. ## Quote styles | Value | Name | Look | | --- | --- | --- | | `'line'` | Side line | A line on the left. The default, so no style is added to the saved HTML. | | `'mark'` | Quotation marks | Centered, slightly larger text. The big quotation marks are drawn by the editor CSS. | | `'box'` | Gray box | Light gray background, rounded corners, no side line | | `'border'` | Bordered box | Thin gray border, rounded corners | Inside a quote the menu also offers "Remove quote". Picking a style outside a quote turns the paragraph into a quote with that style. ## Saved HTML ```html

Side-line quote

Gray box quote

``` > The side line and the big quotation marks come from CSS, not inline styles. Wrap the saved HTML in `
` and load 82editor.css on the reading page to match the editor, or style `blockquote` in your own CSS. ```js editor.exec('blockquote'); // add / remove a quote editor.exec('quoteStyle', 'box'); // line | mark | box | border; '' removes the quote ``` ## Presets The `board` and `full` presets put `quoteStyle` under ⋯. No preset has the `blockquote` button; add it to `toolbar` yourself if you want it. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `blockquote` | toolbar item | - | Add or remove a quote (`Ctrl`+`Shift`+`B`) | | `quoteStyle` | toolbar item | - | Pick a quote style (side line, quotation marks, gray box, bordered box) | | `markdownShortcuts` | boolean | true | Typing shortcuts, including `> ` for a quote | --- # Callouts > Colored boxes: info, tip, success, warning, danger. Source: https://82editor.com/en/docs/callouts/ For notes, tips and warnings that should stand apart from the text. Wraps paragraphs in a colored box with an icon. ```js createEditor('#editor', { toolbar: 'heading | bold | callout | undo redo', }); ``` ## How to use - Pick a kind from the `callout` menu: the paragraph at the caret (or the selected paragraphs) goes into a box with an icon in front. On an empty line you type right after the icon. - With the caret in a box, a bar shows above its right end. Another kind changes the color and icon; the trash button removes the box and keeps the text. - Picking the same kind again, or `Backspace` at the very start of the box, also removes it. - On an empty line, type `/` and pick "Callout" for an info box. - A box can hold lists, tables and other blocks, and can sit inside a collapsible section. ## Kinds | Value | Name | Icon | Background / line | | --- | --- | --- | --- | | `'info'` | Info | ℹ️ | #e7f5ff / #74c0fc | | `'tip'` | Tip | 💡 | #fff9db / #fcc419 | | `'success'` | Success | ✅ | #ebfbee / #69db7c | | `'warning'` | Warning | ⚠️ | #fff4e6 / #ffa94d | | `'danger'` | Danger | 🚫 | #fff5f5 / #ff8787 | ## Saved HTML The look is stored as inline styles, so the box shows the same on a page without CSS and in e-mail. The icon is plain text at the start of the first paragraph. ```html

💡 Landscape photos show larger.

``` ```js editor.exec('callout', 'warning'); // add a box or change its kind editor.exec('callout', ''); // remove the box ``` ## Presets Under ⋯ in the `board` and `full` presets. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `callout` | toolbar item | - | Add a callout, change its kind, remove it | | `slashMenu` | boolean | true | The "Callout" entry of the `/` menu | --- # Collapsible sections > Sections that show a title and open on click (details). Source: https://82editor.com/en/docs/details/ For answers, spoilers or long side notes that only some readers want. It is saved as a standard `
` element, so it folds and opens on any page without scripts. ```js createEditor('#editor', { toolbar: 'heading | bold | details | undo redo', }); ``` ## How to use - On an empty line, press `details`: a section goes in with its title "Show more" selected, so you can type the title right away. - With paragraphs selected, the button folds them into a section. - Inside a section, the button removes it: the title becomes a paragraph and the content stays. `Backspace` at the start of the title does the same. - On an empty line, type `/` and pick "Collapsible section". ## Always open while editing Hidden content is hard to edit, so sections stay open in the editor and clicking the title does not fold them. A section that is saved folded shows ▸ before its title. With the caret in a section, a bar shows above its right end: - **Start expanded**: adds `open` to the saved HTML so readers see it open. Off (folded) by default. - **Remove collapsible section**: keeps the content without the fold. In read-only mode (`readOnly: true` or `setReadOnly(true)`) sections fold as they will be saved, and readers can open them. ## Saved HTML ```html
Show the answer

Hallasan (1,947 m)

``` The default title of a new section is the UI string `detailsSummary`; change it with the `locale` option. ```js createEditor('#editor', { locale: { detailsSummary: 'Read more' }, }); editor.exec('details'); // add / remove editor.exec('detailsOpen'); // toggle "start expanded" ``` ## Presets Under ⋯ in the `board` and `full` presets. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `details` | toolbar item | - | Add or remove a collapsible section | | `locale.detailsSummary` | string | 'Show more' | Title of a new section | | `readOnly` | boolean | false | Read-only mode really folds and opens sections | --- # Dividers and page breaks > Horizontal lines, six divider styles, and page breaks for printing. Source: https://82editor.com/en/docs/dividers/ Draw a line where the text changes topic, or make the next part start on a new page when printed. ```js createEditor('#editor', { toolbar: 'bold | hr hrStyle pageBreak | undo redo', }); ``` ## Dividers The `hr` button inserts a plain `
` at the caret. The `hrStyle` dropdown inserts one in a chosen style. On an empty line you can also type `/` and pick "Horizontal line". | Value | Name | Saved style | | --- | --- | --- | | `'thin'` | Thin line | none (`
`) | | `'thick'` | Thick line | `border-top: 3px solid #adb5bd` | | `'dashed'` | Dashed | `border-top: 2px dashed #adb5bd` | | `'dotted'` | Dotted | `border-top: 3px dotted #adb5bd` | | `'double'` | Double line | `border-top: 4px double #adb5bd` | | `'short'` | Short line | `border-top: 2px solid #868e96; width: 64px; margin: 2em auto` | Every style except thin is saved inline together with `border: 0`, so it looks the same without your CSS. The thin line follows the browser’s or your site’s `hr` style. ## Page breaks `pageBreak` marks where printing (or saving as PDF) moves on to the next page. It is invisible on screen; while editing it shows as a dashed line labelled "PAGE BREAK". It is also in the `/` menu. ```html
``` ```js editor.exec('hr'); // plain divider editor.exec('hr', 'dashed'); // thin | thick | dashed | dotted | double | short editor.exec('pageBreak'); ``` ## Presets The `board` and `full` presets put `hrStyle` under ⋯. `pageBreak` is only in `full`. No preset has the `hr` button. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `hr` | toolbar item | - | Insert a plain divider | | `hrStyle` | toolbar item | - | Insert a divider in one of six styles | | `pageBreak` | toolbar item | - | Insert a page break for printing | --- # Code blocks > Code blocks that keep line breaks and indentation, with a language. Source: https://82editor.com/en/docs/code-blocks/ For source code, config files and terminal commands, where characters and spaces must stay exactly as typed. Shown in a gray box with a monospace font. ```js createEditor('#editor', { toolbar: 'heading | bold code | codeBlock | undo redo', }); ``` ## How to use - The `codeBlock` button or `Ctrl`+`Shift`+`C` turns the paragraph at the caret (or the selected paragraphs) into a code block, one line per paragraph. - Inside a code block the button turns each line back into a paragraph. `Backspace` at the very start does too. - `Enter` adds a line. `Enter` on an empty last line leaves the block. - `Tab` inserts two spaces. - On an empty line, type `/` and pick "Code block". - The selection bubble toolbar does not show inside code blocks. ## Choosing a language With the caret in a code block, a bar shows below it. The language you pick goes on `` as `class="language-…"`. The editor does not color the code; a highlighter on the reading page (Prism, highlight.js and the like) uses that class. The bar’s close button turns the block back into paragraphs. | Value | Language | | --- | --- | | (none) | Plain text | | `html` `css` `js` `ts` `json` | HTML, CSS, JavaScript, TypeScript, JSON | | `bash` `python` `java` `kotlin` `php` `sql` | Shell, Python, Java, Kotlin, PHP, SQL | | `c` `cpp` `csharp` `go` `rust` `swift` `ruby` | C, C++, C#, Go, Rust, Swift, Ruby | | `xml` `yaml` `markdown` | XML, YAML, Markdown | ## Code inside a sentence For a word or a short command, use the `code` button (`Ctrl`+`E`). With `markdownShortcuts` on, typing ``code`` in backticks works too. Markdown ``` fences come in through [Markdown paste](https://82editor.com/en/docs/markdown/). ## Saved HTML ```html
const editor = createEditor('#editor', {
  toolbar: 'board',
});
``` > The gray background and monospace font come from CSS, not inline styles. Wrap the saved HTML in `
` with 82editor.css on the reading page, or style `pre` in your own CSS. ```js editor.exec('codeBlock'); // add / remove editor.exec('codeBlock', 'php'); // add with a language editor.exec('code'); // inline code ``` ## Presets `codeBlock` is under ⋯ in the `board` and `full` presets. `code` (inline) is only in `full`. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `codeBlock` | toolbar item | - | Add or remove a code block (`Ctrl`+`Shift`+`C`) | | `code` | toolbar item | - | Inline code (`Ctrl`+`E`) | | `markdownShortcuts` | boolean | true | Includes the ``code`` typing shortcut | --- # Columns > Two or three columns side by side; they stack on phones by themselves. Source: https://82editor.com/en/docs/columns/ For two or three blocks side by side: a photo and its text, pros and cons. On narrow screens the columns stack without any media query. ```js createEditor('#editor', { toolbar: 'heading | bold | bulletList | columns | undo redo', }); ``` ## How to use - Pick 2 or 3 columns from the `columns` menu: the paragraph at the caret (or the selected paragraphs) goes into the first column; the others start empty. - With the caret in a column, a bar shows above the right end: switch between 2 and 3 columns, or "No columns". - Going from 3 to 2 moves the dropped column’s content to the end of the last remaining one. Removing columns joins the content in order and drops untouched empty lines. - While editing, each column has a dashed outline. It is not saved. ## On phones Each column has `flex: 1 1 240px`, so when a column would get narrower than 240px they wrap under each other. No change to your CSS is needed. ## Saved HTML ```html

Pros

…

Cons

…
``` ```js editor.exec('columns', '3'); // three columns (creates them outside a column set) editor.exec('columns', ''); // remove the columns ``` ## Presets Under ⋯ in the `board` and `full` presets. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `columns` | toolbar item | - | Make 2 or 3 columns, change the count, remove them | --- # Bookmarks and contents > Bookmark blocks with an id, link to them with #, and build a table of contents from headings. Source: https://82editor.com/en/docs/bookmarks/ For links that jump to a place in a long post. A bookmark is an `id` on a block; a table of contents is a list of links to the headings’ bookmarks. ```js createEditor('#editor', { toolbar: 'heading | bold | link | anchor toc | undo redo', }); ``` ## Adding a bookmark - Put the caret in a block and press `anchor`. The name field is filled with a name made from the block’s text. - Names keep letters (Korean too), digits, `-` and `_`; spaces and symbols become `-`. A name already in use gets `-2`, `-3`…. - Apply an empty name to remove the bookmark. - Blocks that take a bookmark: headings, paragraphs, list items, quotes, callouts, figures, tables, collapsible sections. - While editing, bookmarked blocks show a faint `#` to their left. ## Linking to a bookmark - The address field of the link dialog (`Ctrl`+`K`) suggests the post’s bookmarks as `#name`. - `Ctrl`+click (`⌘`+click on a Mac) on a `#` link while editing scrolls to it inside the editor. So does the link bar’s "Open" button. ## Table of contents The `toc` button builds a list from the post’s headings (H1–H4) and inserts it at the caret. Headings without a bookmark get one from their text. Lower levels are indented 20px each. With no headings nothing is inserted. It is also in the `/` menu. > The list is a snapshot of the headings at that moment. After renaming or adding headings, delete it and insert it again. While editing, the list is one block and its text cannot be edited directly. ## Saved HTML ```html

Install

``` Ids survive the sanitizer, Korean ones included. The list title is the UI string `tocTitle`; change it with the `locale` option. ```js createEditor('#editor', { locale: { tocTitle: 'In this post' }, }); editor.exec('anchor'); // open the bookmark dialog editor.exec('toc'); // insert a table of contents ``` ## Presets `anchor` and `toc` are under ⋯ in the `board` and `full` presets. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `anchor` | toolbar item | - | Add, rename or remove the bookmark of the block at the caret | | `toc` | toolbar item | - | Insert a table of contents from the headings | | `locale.tocTitle` | string | 'Contents' | Title at the top of the list | --- # Templates > Insert ready-made content from a menu. Source: https://82editor.com/en/docs/templates/ If posts often start from the same layout (notices, support replies, meeting notes), register them in the `templates` option and insert them from a menu. ```js createEditor('#editor', { toolbar: 'heading | bold | template | undo redo', templates: [ { title: 'Notice', description: 'Title, date, contact', html: '

Notice title

Date:

Contact:

', }, { title: 'Meeting notes', description: 'Attendees, agenda, decisions', html: '

Attendees

Agenda

Decisions

', }, ], }); ``` ## How to use - The `template` button lists your templates; `description` shows small next to the title. - The template’s HTML is inserted at the caret. It does not replace the post. - With `slashMenu` on, templates are in the `/` menu too, searchable by title and description. - With no `templates`, the menu shows only a "no matches" line. > Template HTML goes through the allow-list sanitizer like any other content. To keep your site’s classes, register them with the `styles` option ([Styles](https://82editor.com/en/docs/styles/)) or wrap the markup in an [HTML block](https://82editor.com/en/docs/html-block/). ## From code To insert a layout at a moment of your choosing, call `insertHTML`. To replace the whole post, `setHTML`. ```js editor.insertHTML('

Notice title

'); // at the caret (sanitized) editor.setHTML('

Notice title

'); // replace everything ``` ## Presets `template` is only in the `full` preset, under ⋯. With `board`, add it to `toolbar` yourself. ## Options | Name | Type | Default | Description | | --- | --- | --- | --- | | `templates` | { title, html, description? }[] | - | Templates shown in the menu | | `template` | toolbar item | - | Open the template menu | | `slashMenu` | boolean | true | List templates in the `/` menu too | --- # HTML block > Insert ready-made HTML (like a product page) with its classes and styles. Source: https://82editor.com/en/docs/html-block/ For HTML you already have: a product detail page, a banner, a hand-made layout. Unlike regular content, an HTML block keeps classes and nearly every CSS property. ```js createEditor('#editor', { toolbar: 'heading | bold | htmlBlock | source | undo redo', }); ``` ## How to use - The `htmlBlock` button opens a box to paste HTML into. "Insert" puts the block at the caret. - In the editor an HTML block is one piece: its text cannot be edited in place, and a click selects the whole block and shows its bar. - The bar: **Edit HTML** (edit and apply in the same box, or remove), **Move up**, **Move down**, **Remove**. ## What stays and what goes | | Inside an HTML block | Regular content | | --- | --- | --- | | class | kept (up to 12 per element) | dropped (only `styles` classes stay) | | CSS properties | nearly all kept (grid, gradients …) | allow-listed ones only | | `section` `article` `header` `footer` `aside` `main` `center` | kept | tag removed, text kept | | `script` `style` `form` `input` `button` `svg` … | removed with content | removed with content | | Event attributes like `onclick` | removed | removed | | `javascript:` URLs, CSS `url()` and `expression()` | removed | removed | | iframes | allowed sites only (`allowedIframeHosts`) | allowed sites only | > `