最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Can I alter the block editor's paste text behavior?

programmeradmin0浏览0评论

In the sample editor, create a paragraph with just Hello world, copy it and--while still selected--paste over it. You get the expected pasted text.

But if there's a leading word with a colon (Hello: world) then pasting puts the entire text into 1 link. I don't think I've seen this auto-linking in any other WYSIWYG editor, but I don't know that it's a bug.

Is this a feature that can be disabled?

In the sample editor, create a paragraph with just Hello world, copy it and--while still selected--paste over it. You get the expected pasted text.

But if there's a leading word with a colon (Hello: world) then pasting puts the entire text into 1 link. I don't think I've seen this auto-linking in any other WYSIWYG editor, but I don't know that it's a bug.

Is this a feature that can be disabled?

Share Improve this question asked Jan 25, 2021 at 17:30 Steve ClaySteve Clay 1756 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

This is apparently Gutenberg bug 24895.

The problem being that Hello: is a well-formed URI scheme, so WP shouldn't rely on new URL() alone to recognize a pasted link.

new URL('Hello: world');
发布评论

评论列表(0)

  1. 暂无评论