Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置maxLength后,添加完超链接后再输入的文字内容还算做超链接的一部分,且无法继续插入超链接 #4696

Closed
460476280 opened this issue Aug 11, 2022 · 6 comments
Labels

Comments

@460476280
Copy link

bug 描述

设置maxLength后,添加完超链接后再输入的文字内容还算做超链接的一部分(链接文本,文字为蓝色),且无法继续插入超链接,回车换行后才可以继续插入

你预期的样子是?

设置maxLength后,添加完超链接后再输入的文字内容不算做超链接的一部分,可以继续插入超链接,与不设置maxLength效果相同

系统和浏览器及版本号

  • 操作系统 Windows 10
  • 浏览器和版本 Chrome 版本 104.0.5112.81(正式版本) (64 位)

wangEditor 版本

"@wangeditor/editor": "^5.1.14",
"@wangeditor/editor-for-vue": "^1.0.2",

demo 能否复现该 bug ?

在线 demo

https://codesandbox.io/live/2f3965d46d8?file=/src/components/MyEditor.vue

最小成本的复现步骤

(请告诉我们,如何最快的复现该 bug)

  • 步骤一 设置maxLength: 500
  • 步骤二 插入超链接
  • 步骤三 继续输入文字
@wangfupeng1988
Copy link
Collaborator

wangfupeng1988 commented Aug 11, 2022

这不仅仅是 maxLength 情况下吧,你去掉 maxLength 就不会这样了吗?

@460476280
Copy link
Author

460476280 commented Aug 12, 2022

这不仅仅是 maxLength 情况下吧,你去掉 maxLength 就不会这样了吗?

两种情况截图如下,没有maxLength为正常情况@wangfupeng1988

屏幕截图 2022-08-12 150604
屏幕截图 2022-08-12 150645

@wangfupeng1988
Copy link
Collaborator

步骤二 插入超链接

这个具体是什么操作的?
是先输入文本,选中了在设置链接?还是直接插入一个超链接?

@460476280
Copy link
Author

步骤二 插入超链接

这个具体是什么操作的? 是先输入文本,选中了在设置链接?还是直接插入一个超链接?

@wangfupeng1988经过测试,1.设置maxLength后,直接插入超链接再输入的文字为超链接一部分(还在a标签内)
2.不管是否设置maxLength,选中已输入文字设置为超链接后,再输入的文字也一样算做为超链接

@wangfupeng1988
Copy link
Collaborator

2.不管是否设置maxLength,选中已输入文字设置为超链接后,再输入的文字也一样算做为超链接

这个是符合预期的。就像在加粗文字后面,继续输入文字,也会跟着加粗。

@wangfupeng1988
Copy link
Collaborator

1.设置maxLength后,直接插入超链接再输入的文字为超链接一部分(还在a标签内)

这个会继续优化

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants