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

This widget could not be displayed.

done.. thnaks a lot

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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 Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

266 views 2 4
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