Skip to content

下划线

使用此扩展添加 u 标签

使用

vue
<template>
  <TTiptap :editor="editor" />
</template>

<script setup>
import { TTiptap, EditorConfig, Underline } from "tdesign-tiptap";
const editor = new EditorConfig({
  content: "<p>Tdesign-tiptap</p>",
  buttonExtensions: [Underline],
});
</script>

配置

HTMLAttributes

为渲染的标签添加自定义属性,默认值:{}

js
Underline.configure({
  HTMLAttributes: {
    class: 'custom-class',
  },
})

bar

是否在菜单栏显示,默认值:true

js
Underline.configure({
  bar: true
})

bubble

是否在浮动菜单显示,默认值:false

js
Underline.configure({
  bubble: true
})