update content
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# FontFamily
|
||||
This extension enables you to set the font family in the editor.
|
||||
This extension enables you to set the font family in the editor. It uses the [`TextStyle`](/api/marks/text-style) mark, which renders a `<span>` tag. The font family is applied as inline style, for example `<span style="font-family: Arial">`.
|
||||
|
||||
## Installation
|
||||
::: warning Use with TextStyle
|
||||
@@ -15,9 +15,14 @@ yarn add @tiptap/extension-text-style @tiptap/extension-font-family
|
||||
```
|
||||
|
||||
## Settings
|
||||
| Option | Type | Default | Description |
|
||||
| ------ | ----- | ------------- | --------------------------------------------------------------------- |
|
||||
| types | array | ['textStyle'] | A list of marks where the font family attribute should be applied to. |
|
||||
| Option | Type | Default | Description |
|
||||
| ------ | ----- | ------------- | ------------------------------------------------------------------------ |
|
||||
| types | array | ['textStyle'] | A list of marks to which the font family attribute should be applied to. |
|
||||
|
||||
## Commands
|
||||
| Command | Parameters | Description |
|
||||
| ---------- | ---------- | --------------------------------------------- |
|
||||
| fontFamily | fontFamily | Applies the given font family as inline style |
|
||||
|
||||
## Source code
|
||||
[packages/extension-font-family/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-font-family/)
|
||||
|
||||
@@ -10,6 +10,11 @@ npm install @tiptap/extension-text-style
|
||||
yarn add @tiptap/extension-text-style
|
||||
```
|
||||
|
||||
## Commands
|
||||
| Command | Parameters | Description |
|
||||
| -------------------- | ---------- | --------------------------------------------- |
|
||||
| removeEmptyTextStyle | – | Remove `<span>` tags without an inline style. |
|
||||
|
||||
## Source code
|
||||
[packages/extension-text-style/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-text-style/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user