We use confluence for documentaion but i find very time consuming to select the code macro; it's a 5 step process. Even typing the macro by hand is not efficient.
In the Stack Overflow editor all we have to do is select the text and press a button or hit ctrlK, and the text is formatted as code.
Is there a way to do this in Confluence?
From the editor toolbar, choose Insert > Other Macros. Choose HTML from the Development category. Choose Insert. Paste the HTML embed code from the website you want to display into the body of the macro.
When you view a page, you should be able to highlight a piece of text and a popup will show, that will allow you to start an annotation. Click the chat icon and that will highlight the code, and you can start talking about it.
even typing by hand is also not efficient
I use the code macro extensively and always use the autocomplete feature by typing { and choosing 'Code Macro' from the list (It's enough to type co for the code macro). This is a very efficient.
Of course a keyboard shortcut would be faster, but there is no shortcut for the code macro. (AFAIK there is no keyboard shortcut for a specific macro at all)
I use Ctrl-Shift-D then wrap the text in {code}
.
This also fixes the problem with formatting being stripped from pasted text. In Confluence 5.x if you edit a page, you can type {cod<enter}
and it puts a Code Block box on the page, but when code is pasted into this box it can strip out end of line characters.
{code}
tags.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With