如何为 Confluence 创建导出插件
我想创建一个导出为自定义文档格式的插件,类似于当前 Confluence 中导出为 PDF 和导出为 Word 的方式。
有人有为 Confluence 创建自定义导出插件的经验吗?如果是这样,您是否知道任何描述所涉及内容的资源或示例?
I'd like to create a plugin that exports into a custom document format similar to the way that export to PDF and export to Word currently work in Confluence.
Does anyone have experience creating a custom export plugin for Confluence? If so do you know of any resources or samples that describe what would be involved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是迄今为止我发现的最有用的资源:
插件教程 - 将自定义操作添加到 Confluence - 这展示了如何将操作添加到出现在 Confluence 页面顶部的“工具”菜单中。此外,它还展示了如何与 Page 对象交互以获取有关页面的更多信息。
插件模块类型 - 我发现有用的第二个指南是通用插件模块类型的列表。发现“插件”实际上是“模块”的集合是非常有用的,并且查看此列表有助于理解如何应用该模型来创建我正在寻找的类型的插件。此外,Confluence 插件指南对于 Confluence 特定的细分也很有帮助插件模块。
Confluence 开发者常见问题解答 - 有助于了解如何将 wiki 内容从页面转换为 HTML 以及许多其他难以找到的精华。
最后,它很难找到,但为了了解如何“定位”现有 UI 的特定菜单或区域来扩展,我发现阅读 创建您的插件描述符。
Here are the most useful resources that I've found so far:
Plugin Tutorial - Adding a custom action to Confluence - This shows how to add an action to the "Tools" menu that appears at the top of a confluence page. Additionally it shows how to interact with the Page object to get more info about the page.
Plugin Module Types - The second guide I found helpful was the list of general plugin module types. It was informative to discover that a "plugin" is really a collection of "modules" and seeing this list was helpful to understand how to apply that model to creating a plugin of the type I was looking for. Additionally the Confluence Plugin Guide was also helpful for a breakdown on Confluence specific plugin modules.
The Confluence Developer FAQ - Useful for information on how to convert wiki content from a page into HTML as well as a number of other hard-to-find gems.
Finally, it was hard to find, but in order to understand how to "target" a particular menu or area of the existing UI to extend, I found it very helpful to read about the guide for Creating your Plugin Descriptor.