我正在使用 TinyMCE 为用户提供在 textarea 表单字段上进行简单文本格式化(粗体、斜体、列表)的功能。一切正常,除了在 Internet Explorer 中(8 但我读过它发生在早期版本上),当用户键入 URL(例如 www.google.com)时,它会在 TinyMCE 编辑器中自动转换为 HTML 链接,因为他们类型。这在 Firefox (3) 中不会发生。如何防止 IE 这样做?
我已经使用以下内容初始化了 TinyMCE:
tinyMCE.init({
mode : "textareas",
theme : "simple",
convert_urls : false
});
但我不认为 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"
});
但同样,我认为这只是一种影响 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 代码库非常大且难以追踪,所以我希望有人可以帮助我稍微隔离一下这个问题。