# Extension reference {#reference}

Source: [Extension reference | Create custom extensions for the React editor · Yurich](https://leeyujoo.com/yurich/extensions/reference/)

Package: [`yurich`](https://www.npmjs.com/package/yurich)

Package version: `0.1.2`

Use these fields to define an `Extension` object. For an example with a validated attribute and custom commands, see [Define an extension](https://leeyujoo.com/yurich/extensions/extension-object/).

| Field | Use |
| --- | --- |
| `name` | Unique extension name. |
| `marks` | Inline tags, JSON types, aliases, and attribute rules. |
| `blocks` | Block tags, JSON types, aliases, and fixed JSON attributes. |
| `blockStyles` | Allowed CSS properties and values for blocks. |
| `commands` | Map command names to functions that receive an editor and a value. |
| `keyboardShortcuts` | Map key combinations to command names. |
| `isActive` | Report active state for the current selection. |

An attribute rule returns the value to keep or `null`. Start with the public editing methods such as `setMark`, `setBlock`, and `setBlockStyle`. For a custom DOM operation, use `editor.change(edit)` to record the edit in history and normalize the result. See the [extension API](https://github.com/YUJOO-LEE/yurich#custom-extensions) for the full method list.
