我有一个内容可编辑的 Iframe 我想自动链接它,例如:
我的内容可编辑 iframe 看起来像 
我尝试在我之前问过的这个问题中使用正则表达式。我在这个问题中使用的函数工作正常,但实际上它会替换所有链接,包括标签中的链接(IMG,现有的 A HREF)。
但是我不想使用 regx如果我使用 regx 转换发生在我单击任何提交或保存按钮时。
当用户在内容可编辑的 Iframe 中粘贴 url 时,它应该自动将任何链接转换为超链接
我也试过这个小提琴,但是:(不能得到这个
html
<div class="workzone" style="height: 150px;"><iframe id="idContent" width="600" height="280"></iframe></div>
我已经尝试过这个资源,但找不到如何为内容可编辑的 Iframe 解决这个问题。也许这对于 contenteditable div
contenteditable jQuery 中的自动链接 URL :将文本 URL 转换为输入时链接
任何人都可以帮助我内容可编辑的 Iframe 自动链接谢谢。
当我尝试在文本框中粘贴网址时,https://stackoverflow.com/它不会自动转换为超链接.
我尝试使用正则表达式这是我之前提出的问题.我在这个问题中使用的功能工作正常,但实际上它将替换所有链接,包括标签中的链接(IMG,现有的A HREF).
我不想使用regx,如果我使用regx转换发生时,我点击任何提交或保存按钮.
**当用户在文本框中粘贴网址时,它应自动将任何链接转换为超链接****
我用regx尝试过这个
例如:
what = "<span>In the task system, is there a way to automatically have any site / page URL or image URL be hyperlinked in a new window?</span><br><br><span>So If I type or copy http://www.stackoverflow.com/ for example anywhere in the description, in any of the internal messages or messages to clients, it automatically is a hyperlink in a new window.</span><br><a href="http://www.stackoverflow.com/">http://www.stackoverflow.com/</a><br> <br><span>Or if I input an image URL anywhere in …Run Code Online (Sandbox Code Playgroud)