fix: solving the issue of the default editor format brush being incorectly filtered (#6566)

#### What type of PR is this?

/kind bug
/area editor
/milestone 2.19.x

#### What this PR does / why we need it:

为默认编辑器格式刷及清除格式扩展增加 name,用于解决其重名而导致被错误过滤的问题

Fixes #6562 

#### How to test it?

查看默认编辑中格式刷及清除格式功能是否存在且运行正常。

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器格式刷及清除格式功能不存在的问题
```
pull/6570/head v2.19.0
Takagi 2024-09-01 23:07:36 +08:00 committed by GitHub
parent 710777a10a
commit 142f46b435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import { markRaw } from "vue";
import MdiEraser from "~icons/mdi/eraser";
const clearFormat = Extension.create<ExtensionOptions>({
name: "clearFormat",
addOptions() {
return {
getToolbarItems({ editor }: { editor: Editor }) {

View File

@ -20,6 +20,8 @@ export interface FormatBrushStore {
}
const formatBrush = Extension.create<any, FormatBrushStore>({
name: "formatBrush",
addOptions() {
return {
...this.parent?.(),