【问题标题】:Atom snippet description with link带有链接的原子片段描述
【发布时间】:2021-06-13 18:18:46
【问题描述】:

有没有办法让 sn-p 描述中的链接可点击/设置样式?
我知道descriptionMoreURL,但我有兴趣添加第二个链接。

这不起作用:

'.source.js':
    'test 1':
        'prefix' : 't1'
        'body': 't1()'
        'description': 'Also works in combination with https://link.com'

这不起作用:

'description': '[Also works in combination with](https://link.com)'

这也行不通:

'description': '<a href="https://link.com">Also works in combination with]</a>'

有谁知道怎么做/有可能吗?

【问题讨论】:

    标签: atom-editor


    【解决方案1】:

    很遗憾,这是不可能的。 description 似乎不支持任何格式。

    你可以通过parameters leftLabelHTML and rightLabelHTML添加HTML,但是如果你点击链接,它会插入sn-p,这并不理想。

    作为参考,这里是底层 autocomplete-plus suggestion parameters 的文档。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-29
      • 2017-02-07
      相关资源
      最近更新 更多