在 Discourse 编辑器工具栏中提供一个按钮,用于在主题和帖子中添加行内工具提示。
7 个赞
ked
(Kenny DuBose)
2026 年2 月 3 日 18:31
2
这个 TC 可以在任何主题上工作吗?看起来很有趣。
1 个赞
Moin
2026 年2 月 3 日 19:13
3
对我来说,这看起来与 Add <abbr> tags to words in posts 组件相似。我注意到这个组件没有使用 \u003cabbr\u003e HTML 标签,比如 <abbr title="Text shown on hover">Hover me</abbr>(\u003cabbr title=\"Text shown on hover\"\u003eHover me\u003c/abbr\u003e),这让我对设计选择感到好奇。
根据我的理解,使用 <abbr> 的一个好处是,即使组件以后被移除,信息仍然可用。我认为使用当前方法,在这种情况下 span 会变得不可见。我很想了解这种方法有什么优点,并希望学到新东西。
2 个赞
一如既往,我非常感谢任何愿意分享想法或参与此项工作的人
我的目标是有一个工具栏按钮,用于快速创建工具提示,该工具提示在悬停时(或可选地在点击时)显示,并且可以包含任何内容(包括但不限于 HTML 和 Markdown),并且即使组件被移除,或者页面以 已发布页面 的形式查看,并且在没有非核心/默认插件或主题组件的情况下,它也能最优雅地继续显示所包含的内容。
我希望主题组件(TC)能够提供最佳的通用兼容性,利用核心的 Tooltip 和/或 DModal,或者简单地扩展或改编 脚注插件 。
我已经测试了一些现有的主题组件和插件,它们各自提供了特定的用例,并且都有自己的局限性或奇怪的行为,例如不能正确渲染某些类型的内容,或者在移动设备上不可用,或者 Tip 容器不显示或不适应位置变化等。
我本来想制作一个表格,显示每个现有的组件/插件及其各自的用例和局限性,但目前我没有时间,非常欢迎任何意见。
Summary
Discourse Footnote allows users to create markdown footnotes in posts.
Install Guide
This plugin is bundled with Discourse core. There is no need to install the plugin separately.
Enabling Footnote
The Footnote plugin is default enabled but can be disabled/enabled from the admin/plugins page:
[enable footnote]
Features
Once enabled, you can add footnotes to your posts by typing them in like this:
A sentence that needs a footnote. ^[The foo…
Contribute to Arkshine/discourse-tooltipify-words development by creating an account on GitHub.
About
This theme component is ported from Auto-Linkify Words to provide functionality similar to the Abbreviations and acronyms plugin – namely to wrap various abbreviations used in a given forum/site/Discourse installation in <abbr> tags.
Location
How to install
Credits
Thanks to @sam for writing the “Linkify words in post” plugin.
1 个赞