I've got a Confluence Blueprint where the template.xml contains a macro with BodyType.PLAIN_TEXT and is similar to:
<ac:macro ac:name="awesome-macro"><ac:plain-text-body><![CDATA[ <ac:placeholder>My placeholder text</ac:placeholder> ]]></ac:plain-text-body></ac:macro>
The <ac:placeholder/> node is of course escaped, so appears in plain text on any page created from my Blueprint.
How is it possible to get the placeholder to work correctly?
My best guess is that it's not possible at this moment as Blueprints are fairly new, but please enlighten me :)
Community moderators have prevented the ability to post new answers.
Hi David,
Sorry I never replied properly! Yep, unfortunately it looks like you just can't do it - I was trying to do this the other day and plain-text-body blocks just swallow anything except plain text. I've raised CONF-30673 for you.
Cheers,
Anna
Hey David,
This should work okay. I think the problem is the CDATA tag. Try putting the placeholder directly in the plain-text-body tag and it should show up unescaped.
Cheers,
Anna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Anna Katrina Dominguez: Thanks for the reply. I tried that. Without the CDATA section, the content of the macro appears empty :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David, I just tried this on my local instance and it worked fine:
<ac:macro ac:name="panel"> <ac:rich-text-body> <ac:placeholder>My placeholder text</ac:placeholder> </ac:rich-text-body> </ac:macro>
Which version of Confluence are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Anna Katrina Dominguez:
Right, I'm using <ac:plain-text-body> and you're using <ac:rich-text-body> -- I think that's the problem.
I'm on Confluence 5.1.4.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.