它在此关于自定义个人样式的帖子中提到,无法直接使用 链接标签,因为它是一个例外,不允许任何 data-attributes。
解决方案是使用 Markdown [链接] 来启用属性的使用,就像这样:
代码:
This <span data-button>[link](https://discourse.org/)</span> use Mardown !
结果:
但是,对于此特定帖子(甚至对于整个 discourse)的结构,我需要使用 HTML 中的
以方便使用,但这似乎会阻止任何 BBCode 或 Markdown 被正确解释。因此,在 div 中直接使用 Markdown 链接不起作用。
代码:
<div>
This <span data-button>[link](https://discourse.org/)</span> use Mardown in a div !
</div>
结果:
>This [link](https://discourse.org/) use Mardown in a div !
我发现自己无法使用 标签(这会阻止 data-attributes),也无法使用 Markdown 或 BBCode(它们只能在 div 外工作)。
有人能提供解决方案吗?非常感谢。