document text style and font family extensions (wip)
This commit is contained in:
5
docs/src/demos/Marks/TextStyle/index.spec.js
Normal file
5
docs/src/demos/Marks/TextStyle/index.spec.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
context('/api/marks/text-style', () => {
|
||||||
|
before(() => {
|
||||||
|
cy.visit('/api/marks/text-style')
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -1,18 +1,24 @@
|
|||||||
# FontFamily
|
# FontFamily
|
||||||
|
This extension enables you to set the font family in the editor.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
::: warning Use with TextStyle
|
::: warning Use with TextStyle
|
||||||
This extension requires the [`TextStyle`](/api/nodes/text-style) mark.
|
This extension requires the [`TextStyle`](/api/marks/text-style) mark.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# with npm
|
# with npm
|
||||||
npm install @tiptap/extension-font-family
|
npm install @tiptap/extension-text-style @tiptap/extension-font-family
|
||||||
|
|
||||||
# with Yarn
|
# with Yarn
|
||||||
yarn add @tiptap/extension-font-family
|
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. |
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-font-family/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-font-family/)
|
[packages/extension-font-family/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-font-family/)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Text Style
|
# Text Style
|
||||||
This mark renders a `<span>` HTML tag and enables you to add a list of styling related attributes, for example font-family, font-size, or font-color. The extension doesn’t add any styling attribute by default, but other extensions use it as the foundation, for example `FontFamily`.
|
This mark renders a `<span>` HTML tag and enables you to add a list of styling related attributes, for example font-family, font-size, or font-color. The extension doesn’t add any styling attribute by default, but other extensions use it as the foundation, for example [`FontFamily`](/api/extensions/font-family).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -132,6 +132,7 @@
|
|||||||
link: /api/extensions/focus
|
link: /api/extensions/focus
|
||||||
- title: FontFamily
|
- title: FontFamily
|
||||||
link: /api/extensions/font-family
|
link: /api/extensions/font-family
|
||||||
|
draft: true
|
||||||
- title: Gapcursor
|
- title: Gapcursor
|
||||||
link: /api/extensions/gapcursor
|
link: /api/extensions/gapcursor
|
||||||
- title: History
|
- title: History
|
||||||
|
|||||||
Reference in New Issue
Block a user