Files
halo/ui/packages/editor/docs
Takagi 0f8ef82d6f feat: refactor the drag function and add support for the drag menu (#7861)
#### What type of PR is this?

/kind feature
/area ui
/area editor

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

重构拖拽功能, 使用 Tiptap [extension-drag-handle-vue-3](https://github.com/ueberdosis/tiptap/tree/develop/packages/extension-drag-handle-vue-3)  代替原有的自定义方式。

并且,在此基础上,增加了添加至下一行及拖拽菜单的功能,且支持插件动态扩展拖拽菜单。

<img width="368" height="237" alt="image" src="https://github.com/user-attachments/assets/7f7be771-e549-446f-9f75-c289817965f6" />

对于插件开发者,尤其是编辑器开发者来说,此 PR 有如下变更:
1. 移除了原有的 `getDraggable` 方法,不再使用它,直接移除即可。
2. 新增了 `getDraggableMenuItems` 方法,用于扩展拖拽菜单。

扩展方式如下:
```ts
getDraggableMenuItems() {
  return {
    parentKey: CONVERT_TO_KEY,
    children: {
      items: [
        {
          priority: 10,
          icon: markRaw(MdiFormatParagraph),
          title: i18n.global.t("editor.common.heading.paragraph"),
          action: ({ editor }: { editor: Editor }) =>
            editor.chain().focus().setParagraph().run(),
        }
	]
  }
 }
}
```

#### Does this PR introduce a user-facing change?
```release-note
重构编辑器拖拽功能,并为其增加功能操作菜单。
```
2025-10-30 07:38:18 +00:00
..
2024-02-02 22:22:51 +08:00