halo/ui
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
..
.changeset Move folder console to ui 2024-02-02 22:22:51 +08:00
.husky Fix the problem of being unable to commit (#5362) 2024-02-18 08:00:16 +00:00
.vscode Move folder console to ui 2024-02-02 22:22:51 +08:00
console-src pref: limit the datetime year of the post or page to four digits (#5666) 2024-04-12 11:28:09 +00:00
cypress Move folder console to ui 2024-02-02 22:22:51 +08:00
docs feat: add verification function to the notification settings for the mailbox (#5464) 2024-03-26 08:00:07 +00:00
packages pref: optimize the rich text editor link paste logic (#5680) 2024-04-13 00:50:08 +00:00
public Move folder console to ui 2024-02-02 22:22:51 +08:00
src pref: optimize the rich text editor link paste logic (#5680) 2024-04-13 00:50:08 +00:00
uc-src pref: limit the datetime year of the post or page to four digits (#5666) 2024-04-12 11:28:09 +00:00
.editorconfig Move folder console to ui 2024-02-02 22:22:51 +08:00
.env.development Move folder console to ui 2024-02-02 22:22:51 +08:00
.env.production Move folder console to ui 2024-02-02 22:22:51 +08:00
.eslintrc.cjs Move folder console to ui 2024-02-02 22:22:51 +08:00
.gitignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.gitpod.yml Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmrc Move folder console to ui 2024-02-02 22:22:51 +08:00
.prettierignore Move folder console to ui 2024-02-02 22:22:51 +08:00
Makefile Move folder console to ui 2024-02-02 22:22:51 +08:00
OWNERS Move folder console to ui 2024-02-02 22:22:51 +08:00
README.md Move folder console to ui 2024-02-02 22:22:51 +08:00
build.gradle Collect Gradle plugin versions into root build.gradle (#5511) 2024-03-15 10:34:07 +00:00
cypress.json Move folder console to ui 2024-02-02 22:22:51 +08:00
env.d.ts fix: FormKit code input type error (#5522) 2024-03-18 08:24:08 +00:00
index.html Move folder console to ui 2024-02-02 22:22:51 +08:00
package.json feat: add image editor feature for attachment upload component (#5585) 2024-03-25 04:16:08 +00:00
pnpm-lock.yaml pref: optimize the rich text editor link paste logic (#5680) 2024-04-13 00:50:08 +00:00
pnpm-workspace.yaml Move folder console to ui 2024-02-02 22:22:51 +08:00
postcss.config.js Move folder console to ui 2024-02-02 22:22:51 +08:00
prettier.config.js Move folder console to ui 2024-02-02 22:22:51 +08:00
tailwind.config.js Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.app.json chore: bump vue related packages version (#5384) 2024-02-22 03:12:07 +00:00
tsconfig.json Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.node.json Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.vitest.json Move folder console to ui 2024-02-02 22:22:51 +08:00
vite.config.ts Add build script for ui project 2024-02-03 22:51:50 +08:00
vite.uc.config.ts Add build script for ui project 2024-02-03 22:51:50 +08:00
vitest.config.ts Add build script for ui project 2024-02-03 22:51:50 +08:00

README.md

README

Halo logo

Halo 2.0 的管理端项目(原 halo-admin

GitHub release GitHub GitHub last commit GitHub Workflow Status Gitpod ready-to-code


当前仓库已经将 halo-admin 改为了 console。但对于 Halo 1.x 版本,依旧保持 halo-admin 的概念。

开发环境运行

npm install -g pnpm@8
pnpm install 
pnpm build:packages
pnpm dev

生产构建

pnpm build

状态

Repobeats analytics