本文介绍了如何在tinymce文本编辑器下打开新窗口中的超链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下配置为tinymce。我想在单独的选项卡或窗口中打开超链接的结果。我使用 theme_advanced_link_targets:_ blank
,如下所示但没有帮助。有没有其他的cofig参数呢?
I have below configuration for tinymce. I want to open the result of hyperlink click in separate tab or window. I used theme_advanced_link_targets : "_blank"
as shown below but did not help. Is there any other cofig paramter for this?
var tinyMCESettings = {
theme : "advanced",
plugins : "preview",
readonly : readOnly,
theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull",
width : width,
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "false",
theme_advanced_link_targets : "_blank",
forced_root_block : false,
relative_urls : false,
remove_script_host : false
}
推荐答案
对于TinyMCE 4.0.23,您可以使用(未记录的)选项:
For TinyMCE 4.0.23 you can use the (undocumented) option:
default_link_target:"_blank"
原样:
tinymce.init({
selector: "textarea.rta",
auto_focus: rta_auto_focus,
forced_root_block : false,
statusbar: false,
menubar: false,
content_css : "content.min.css",
plugins: [
"autolink lists link autoresize",
"searchreplace code",
"paste"
],
default_link_target:"_blank",
toolbar: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link"
});
这篇关于如何在tinymce文本编辑器下打开新窗口中的超链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!