Reputation: 301
I got the plugin to generate a page with some content, but I cannot use macros (don't even know if it's possible). Here is what I got:
editorList: [
confluenceWritePage(
confluenceText('''
<h1>html renders fine</h1>
<p>but I do I get to use confluence syntax and the macros?</p>
''')
)
],
I want to be able to use confluence syntax (and macros) instead of plain HTML. How to do it?
Upvotes: 1
Views: 1230
Reputation: 42155
Disclaimer: I am the original author of this confluence-publisher plugin.
I want to be able to use confluence syntax (and macros) instead of plain HTML.
Unfortunately, ever since Confluence changed from the Markup syntax storage format to the XHTML storage format, it's no longer possible to send markup syntax into the plugin.
The easiest way to get the XHTML <ac:.../>
format for a macro you want to use, would be to edit the page first by adding a placeholder version of the macro you want to use. Then save the page and click the ⋯
overflow menu > View Storage Format
. It will open a new window with the raw storage format of the page, and from there you can locate the macro placeholder you added, and copy that block to use in the replacement text. For more information about using the new Storage Format see Confluence Storage Format, which notes that you must be a Confluence Administrator, or have permission to the Confluence Source Editor plugin
I had ideas a long time ago to be able to process the old-style wiki markup into the new XHTML storage format. But I haven't used the plugin myself in a very long time, and never got around to implementing that.
Upvotes: 2