Quick Fix to Adding Code with Formatting on Confluence

I was wracking my head over how I can add a code using a macro and at the same time be able to add minor formatting to it (i.e. bold certain sections). I generally use the macro named "Code Block" when adding extracts of coding; but, as the Code Block macro does not support any sort of formatting  it was of no help.

So, I came up with a work around for it using my own style which is as follows,
  • Write up the code locally on MS Word or Google docs in Courier 11.
  • Take a print screen.
  • Crop the screenshot in Paint .
  • Save the screenshot as an image.
  • Add the image to the wiki page using the "Image" macro.

Well, if you have a better idea than mine please feel free to share it.

Comments