TinyMCE可以自动将超链接变成锚点吗?

发布于 2024-10-09 04:24:32 字数 91 浏览 0 评论 0原文

假设有人在tinymce 中粘贴了一个链接。默认情况下,它只是常规文本。有没有办法自动感知它并对其应用锚点?我想在tinymce/javascript 方面做到这一点。

Let's say someone pastes a link in the tinymce. By default, it's just regular text. Is there a way to automatically sense it and apply a anchor to it? I want to this on the tinymce/javascript side.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

春花秋月 2024-10-16 04:24:32

默认情况下不是,但可以使用 paste_preprocess 设置
您必须解析内容以识别超链接,然后需要用锚点替换它们。
然后它们将被添加到编辑器内容中。

Not by default, but it is possible using the paste_preprocess setting.
You will have to parse the content to identify hyperlinks and then you will need to replace them with anchors.
Then they will get added to the editors content.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文