项目

tiptap TextStyle

版本号 下载量

这个标记会渲染一个 <span> HTML 标签,并允许你添加一系列与样式相关的属性,例如字体家族、字号或颜色。这个扩展本身默认不添加任何样式属性,但其他扩展如 FontFamilyColor 会基于它来工作。

安装

npm install @tiptap/extension-text-style

命令

removeEmptyTextStyle()

移除没有内联样式的 <span> 标签。

editor.command.removeEmptyTextStyle();

源代码

packages/extension-text-style/

使用示例

查看在线演示:https://embed.tiptap.dev/preview/Marks/TextStyle

在本文档中