【问题标题】:Ckeditor Link Anchor without target _blank?没有目标_blank的Ckeditor链接锚?
【发布时间】:2018-08-14 12:38:17
【问题描述】:

我在 drupal 中使用 CKEditor 7.x-1.x-dev,我的链接默认设置为 target _blank

有什么方法可以为锚链接启用“目标”选项卡,这样我就可以删除目标 _blank 或更好的默认锚链接以不使用目标 _blank?

可能在ckeditor/plugins/link/dialogs/link.js or anchor.js

编辑:在 links.js 中找到

"url"==p?(c.config.linkShowTargetTab&&a.showPage("target"),f||a.showPage("upload")):(a.hidePage("target"),f||a.hidePage("upload"));

如何更改它以显示“url”和“anchor”的选项卡?

我尝试将其添加为锚点,但“url”链接类型不再显示。 但是默认为 _self 会好得多。

【问题讨论】:

    标签: drupal drupal-7 ckeditor


    【解决方案1】:

    好的,我想我通过在"url"==p 定义之后添加||"anchor"==p? 来管理,可以根据需要显示两种链接类型的选项卡。

    也许有人可以确认/帮助如何将其默认为 _self 仅用于锚点

    我在这里设置为_blank

    a.email.body=this.getValue()}}],setup:function(){this.getDialog().getContentEl
    ement("info","linkType")||this.getElement().hide()}}]},{id:"target",requiredContent:"a[target]",label:b.target,title:b.target,elements:[{type:"hbox"
    ,widths:["50%","50%"],children:[{type:"select",id:"linkTargetType",label:g.target,"default":"_blank",style:"width : 100%;",items:[[g.notSet,"notSet"
    ],[b.targetFrame,"frame"],[b.targetPopup,"popup"],[g.targetNew,
    "_blank"],[g.targetTop,"_top"],[g.targetSelf,"_self"],[g.targetParent,"_parent"]],onChange:r,setup:function(a){a.target&&this.setValue(a.target.type
    ||"notSet");
    

    【讨论】:

      猜你喜欢
      • 2018-03-15
      • 2023-03-17
      • 2022-08-09
      • 1970-01-01
      • 2020-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-28
      相关资源
      最近更新 更多