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

0 votes
Accepted answer

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.


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

787 views 33 5
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