添加字体设置菜单

This commit is contained in:
麦香缘
2025-02-18 11:24:31 +08:00
parent 7c78fb9e1a
commit 3a35cc45a5
10 changed files with 523 additions and 2 deletions
+8
View File
@@ -5,7 +5,10 @@ import { Extensions } from "@tiptap/core";
import { UAIEditor, UAIEditorOptions } from "./UAIEditor";
import { StarterKit } from "@tiptap/starter-kit";
import { FontFamily } from "@tiptap/extension-font-family";
import { TextStyle } from "@tiptap/extension-text-style";
import FontSize from "../extensions/FontSize.ts";
/**
* 定义编辑器的所有自定义扩展组件
@@ -19,6 +22,11 @@ export const allExtensions = (uaiEditor: UAIEditor, _options: UAIEditorOptions):
bulletList: false,
orderedList: false,
}),
FontFamily,
FontSize.configure({
}),
TextStyle,
];
return extensions;