TinyMCE可以自动将超链接变成锚点吗?
假设有人在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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下不是,但可以使用 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.