防止TinyMCE/Internet Explorer将URL转换为链接

jlp*_*lpp 6 javascript internet-explorer drupal tinymce

我正在使用TinyMCE为用户提供textarea表单字段上简单文本格式(粗体,斜体,列表)的功能.Everthing工作正常,除了在Internet Explorer中(8但我读过它发生在早期版本上),当用户输入URL(例如www.google.com)时,它会自动转换为TinyMCE编辑器中的HTML链接,因为它们类型.这在Firefox(3)中不会发生.我怎样才能阻止IE这样做呢?

我用以下内容初始化了TinyMCE:

tinyMCE.init({
    mode : "textareas",
    theme : "simple",
    convert_urls : false
 });
Run Code Online (Sandbox Code Playgroud)

但我不认为convert_urls会影响我所描述的行为:http://wiki.moxiecode.com/index.php/TinyMCE :Configuration/convert_urls

我试过了:

function myCustomURLConverter(url, node, on_save) {
    return url;
}

tinyMCE.init({
    mode : "textareas",
    theme : "simple",
    urlconverter_callback : "myCustomURLConverter"
 });
Run Code Online (Sandbox Code Playgroud)

但同样地,我认为这只是一种影响URL在加载/保存时如何/是否转换的方式,而不是阻止它们在用户输入时转换为链接:http: //wiki.moxiecode.com/index.php/TinyMCE :配置/ urlconverter_callback

我试图解决的问题至少在几个地方有所描述: http: //tinymce.moxiecode.com/punbb/viewtopic.php?id = 2182&p = 1(第三篇,由tommya撰写) http:// drupal.org/node/149511

有没有人见过这个或有任何关于如何解决它的建议?TinyMCE代码库非常庞大且难以跟踪,所以我希望有人可以帮我解决这个问题.

joe*_*tet 3

似乎没有办法在 IE 中禁用它。这似乎是一个“功能”,并且它也出现在 FCKEditor 上。有几个替代方案,从有效元素中删除该元素。http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements

或者进行服务器端标签解析以将其删除。

我认为这可能是“功能” http://msdn.microsoft.com/en-us/library/aa769893(VS.85).aspx

这里也许是让它工作的提示,但它看起来像 ActiveX 和 VB,所以我在实验中很快就迷失了 http://www.mindfrost82.com/showpost.php?p=1114381&postcount=2