halo/console/packages/editor
Takagi e7789929ec
fix: fix anchor positioning for identical table of contents names (#5101)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.12.x

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

重写了对默认编辑器标题的 id 生成逻辑。目前将会在对标题进行任意的修改之后,对所有的标题进行 id 计算,用以解决当标题名称具有重复时,生成了相同的 id.

需要注意的是,由于需要对任意标题进行修改之后才会进行生效,因此已经存在重名标题 id 的问题时,需要修改任意的标题使其生效。

#### How to test it?

在文章内新增多个相同内容的标题,查看是否可以正常跳转。

#### Which issue(s) this PR fixes:

Fixes #5068 

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器中具有重名标题时,锚点只会跳转至首个的问题。
```
2023-12-26 10:48:06 +00:00
..
docs chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
src fix: fix anchor positioning for identical table of contents names (#5101) 2023-12-26 10:48:06 +00:00
.eslintrc.cjs chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
.gitignore chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
.release-it.json chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
env.d.ts chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
index.html fix: resolve error log when running the dev environment of Console (#4983) 2023-12-03 10:30:08 +00:00
package.json chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
postcss.config.js chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
prettier.config.js chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
tailwind.config.js chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
tsconfig.app.json chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
tsconfig.json chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
tsconfig.node.json chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
tsconfig.vitest.json chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
vite.config.ts chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00
vite.lib.config.ts chore: move @halo-sigs/richtext-editor to this repository (#4934) 2023-11-29 09:14:23 +08:00