halo/ui/packages
Takagi 505f38a145
pref: optimize the rich text editor link paste logic (#5680)
#### What type of PR is this?

/kind improvement
/area editor
/area ui
/milestone 2.15.x

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

优化默认富文本编辑器中自动创建链接的逻辑。

- 移除了粘贴文本时,如果文本为链接则会自动转为链接的问题。
- 移除输入链接文本之后回车,会自动转化为链接的问题。
- 新增当选中的文本内容为链接时,点击链接按钮,将会自动转化选中的文本为链接。

#### How to test it?

在富文本编辑器中,测试如下场景:

1. 在浏览器地址栏复制一个链接,粘贴后不会再转为链接,而是一个普通文本。
2. 输入一段链接文本,按回车后是否不会再被转为链接。
3. 选中一段可以被解析为链接的地址,选中此地址,点击链接按钮,此地址是否会被默认转为链接。

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

Fixes #5653 

#### Does this PR introduce a user-facing change?
```release-note
优化默认富文本编辑器中文本自动转为链接的相关逻辑
```
2024-04-13 00:50:08 +00:00
..
api-client Prepare for developing 2.15.0 (#5635) 2024-04-02 02:20:07 +00:00
components Prepare for developing 2.15.0 (#5635) 2024-04-02 02:20:07 +00:00
editor pref: optimize the rich text editor link paste logic (#5680) 2024-04-13 00:50:08 +00:00
shared Prepare for developing 2.15.0 (#5635) 2024-04-02 02:20:07 +00:00
ui-plugin-bundler-kit Prepare for developing 2.15.0 (#5635) 2024-04-02 02:20:07 +00:00