Rails中的富文本编辑器:在链接对话框窗口中显示链接的目标选项卡(Rich Text Editor in Rails: Show the target tab for links in the li

编程入门 行业动态 更新时间:2024-10-26 10:30:44
Rails中的富文本编辑器:在链接对话框窗口中显示链接的目标选项卡(Rich Text Editor in Rails: Show the target tab for links in the link dialog window)

我在Rich Editor中使用Activeadmin。 当我在编辑器的窗口中添加指向我的文本的链接时,我无法设置链接的打开方式 - 无论是在新选项卡还是新窗口中。

我了解Rich编辑器派生自CKEditor,某些功能被禁用,并且可以重新启用这些功能。 我也知道,这个特殊功能是在行中配置的

config.linkShowTargetTab = true

我只是不确定在哪里准确地把它全局启用。

感谢您对此提出的任何建议。

I am using Activeadmin with Rich Editor. When I add a link to my text within the window of the editor i cannot set how the link is being opened - wether it is in a new tab or a new window ..

I understand that the Rich editor derives from CKEditor with certain features being disabled and that these features can be reenabled. Also I know, that this particular feature is set in the config by the line

config.linkShowTargetTab = true

I am just not sure on where to put it exactly so that it is enabled globally.

Thanks for any advice on this.

最满意答案

在gem source(lib / rich.rb)中,您可以看到@@ editor [:toolbar]中定义的默认按钮:

@@editor = { ... :removeDialogTabs => 'link:advanced;link:target', ...

}

如果我删除“; link:target”,则Tab会显示在我的应用中。

In the gem source (lib/rich.rb) you can see the default buttons defined in @@editor[:toolbar]:

@@editor = { ... :removeDialogTabs => 'link:advanced;link:target', ...

}

If I delete ";link:target" the Tab is shown in my app.

更多推荐

Rich,config,电脑培训,计算机培训,IT培训"/> <meta name="description"

本文发布于:2023-08-02 20:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1380020.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:链接   编辑器   对话框   选项卡   文本

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!