Hi I am having some confusion with code block macro.

Please have a look at the code block on this page, http://www.oracle-base.com/articles/11g/QueryResultCache_11gR1.php

I am not able to configure code block macro in such manner, I want to show some code on documentation in the same manner.

please give some suggestions.

4 answers

1 accepted

done.. thnaks a lot

The "noformat" macro might help in this case. It will show the code as formatted by yourself without any syntax highlighting. We use this a lot for our own documentation, which we generate directly from Confluence.

hi, thanks for quick reply, but it was not much helpful.

please have a look at this web page ,http://www.oracle-base.com/articles/11g/QueryResultCache_11gR1.php

I can achive this no syntax and light grey background with panel macro but the till now impossible task for me was to have some margein on left hand side as you can see in the above web page , this macro boxes never move a bit. sometimes in editing window they accept left indent commnad and move but while you previw it or save it , in comes exactly from where text starts I want it to have some left indent. no syntax highlight is not a problem for me , it just the left indentation.!! please give some suggestions.

Ok, I see what you are after now. Indenting is a little tricky in Confluence, but not impossible. What you can do is create a section with two columns. The first column you make something like 5 or 10% width and leave empty (it effectively creates the indent). You then make the second column 90% width and put your code into it.

So in the rich text editor, you would do this as follows:

  • Select Insert->Other Macro and search for "section". Then create one of those
  • Click inside the section and select Insert->Other Macro and search for "column". Make it 5%, then click Insert.
  • Then click blow the Column that you've just created but inside the Section and select Insert->Other Macro and search for "column" again. Make it 95% width and then click Insert.
  • You then place your code box into the second column.

Hope this helps.

Matt

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,811 views 26 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you