Skip to content

Commit

Permalink
docs: add tab outs
Browse files Browse the repository at this point in the history
  • Loading branch information
BearToCode committed Jul 28, 2024
1 parent 428d436 commit 9b4e685
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/pages/api/core.svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ Type: `DefaultPrefixId[] | true`

Remove default prefixes by id. You can use `true` to disable all of them.

### `disableTabOuts`

Type: `DefaultTabOutId[] | true`

Remove default tab-outs by id. You can use `true` to disable all of them.

### `historyOptions`

History management options.
Expand Down
16 changes: 16 additions & 0 deletions docs/src/pages/api/extension.svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,22 @@ const prefix: Prefix = {

</Code>

## `tabOuts`

"Tab-outs" allow users to use the `tab` key to skip certain pieces of text. For example, after using the bold shortcut and having typed the text, you can press `tab` to skip the ending `**`.

### `TabOut.id`

Type: `string`

Id of the tab-out.

### `TabOut.delimiter`

Type: `string | readonly string[]`

Text(s) to check for. If one of them is found after the textarea `selectionEnd`, pressing tab will place the cursor after that.

### `listeners`

Type: `Listener[]`
Expand Down
8 changes: 8 additions & 0 deletions docs/src/pages/plugins/math.svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,13 @@ interface MathExtensionOptions {
* Options for rehype-katex
*/
rehypeKatex?: RehypeKatexOptions;
/**
* Disable tab outs.
*/
disableTabOuts?: boolean;
/**
* Disable the katex icon.
*/
disableIcon?: boolean;
}
```

0 comments on commit 9b4e685

Please sign in to comment.