mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-05 04:19:07 +08:00
1.2 KiB
1.2 KiB
description | icon |
---|---|
Useless extension, just adds <span> tags (required by other extensions though). | palette-line |
TextStyle
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 color. The extension doesn’t add any styling attribute by default, but other extensions use it as the foundation, for example FontFamily
or Color
.
Installation
# with npm
npm install @tiptap/extension-text-style
# with Yarn
yarn add @tiptap/extension-text-style
Commands
removeEmptyTextStyle()
Remove <span>
tags without an inline style.
editor.command.removeEmptyTextStyle()
Source code
packages/extension-text-style/