Hi there!
I am desperately trying to write some inline code within my documentation. In StackOverflow and GitHub I would do `my code`. For code blocks I do ```my code``` which also does not work (but I can work with the code macro). Something like that:
image2016-9-19 22:51:21.png
So how can I do that? Thank you for your support.
I think you may have answered your own question - use the "code" macro. Use braces to avoid having to use the mouse to pick stuff.
But that's not inline - am I missing something?
I think I might be, what do you mean by "inline"?
Have you tried putting the Code Block macro within a span macro?
I select the code in a sentence and make it Monospace.
Nope, I don't know how to do that. Searched for "span" in macros and couldn't find it. I'm using Confluence in German though.
It's part of the free Content Formatting for Confluence macros from Adaptavist.
This has been and continues to be a serious weakness of Confluence and Hipchat.
Confluence is used heavy by software teams. Software teams speak in sentences mixed with code. Forcing us to use code blocks that break the flow of a sentence is a really poor flow.
Slack gets this 100% right. I can type:
We should really consider using `const toolpane =` instead of using `var toolpane =` when we don't expect the variable to change
That should just work. Meaning it will auto-format my inline code snippets. It works on Slack. It works on Github. It is high-time it works on Confluence as well.
Anything less is just a bad experience. I haven't met a single person yet who disagrees with that.
I could NOT agree more with you Blake.
Confluence is almost certainly 90% used by code teams, but it's code documentation capabilities are not just bad, they are "WORST IN CLASS"
Hey Atlassian, while I'm on a rant.
The {code} macro.. It just grinds at me each and every time I use it. I can happily edit that inline, but then I just have to grab the mouse, and click the title, click edit, wait (I swear.. 5 seconds.. GEEZE!!), then find syntax highlighting, click the fucking dropdown, find my code.. and click that, and finally I"m fucking done!!
Holy shit - I'm seriously just pissed off THINKING ABOUT HOW PAINFUL THIS IS!
Throw me a bone here--- make this thing have the ability to pick a code block WITH highlighting all from the keyboard.
Ed I feel your pain. Why not open an support request for Confluence with the change you want to see. That way it can be tracked and voted up by everyone else.
Yeah, good idea:
https://jira.atlassian.com/browse/CONFCLOUD-57635
Please comment on these tickets for these issues to get Atlassian to fix this sh!t.
Inline code blocks: https://jira.atlassian.com/browse/CONFCLOUD-57638
Macros modal takes 5-6 seconds to load: https://jira.atlassian.com/browse/CONFCLOUD-57639
Macros are slow and they break the flow of a sentence. I should be able to mix code into a sentence. Github and Slack support this. Why can't Atlassian support it as well? It's simply the way developers write now.
It's a major product gap imho.
Wrap inline code blocks in {{double curly braces}}, works for me.
It doesn't work for me in Confluence Cloud. If I write {{double curly braces}} It will show without any format.
Same for me
Looks like they have fixed it for Confluence Cloud. I entered an open backtick, typed inline code text, then entered a close backtick. The delimited text rendered as code. See the updates to the issue cited above:
https://confluence.atlassian.com/confcloud/confluence-editing-improvements-945107733.html
https://confluence.atlassian.com/confcloud/keyboard-shortcuts-markdown-and-autocomplete-724764956.html
Same. This is a big problem for standard documentation.
Is the backtick `code` shortcut coming to confluence server any time soon?
I would suggest that Jira comments are just as important, if not more, of a place to support robust code-style text entry. I am going with the {{{color:green}MY CODE TEXT{color}}} hack - thanks for that, @nancywilson - for now, but it's a LOT of extra cruft to have to write in.
Ok, so I think what @Vicki Foss & others are looking for is a simple way to create this kind of highlighting:
https://cimpress-support.atlassian.net/wiki/spaces/CI/pages/188743804/File+Prep
I think it's easiest to use the HTML macro and apply standard code notation to get the desired effect. Really not such heavy lifting.
<p>You can <span style="background-color:#c5d9f7;"> <code>highlight inline code sections</code></span> using the HTML macro and standard code notation for span tags.</p>
Sorry if this is a stupid question, but can this be easily done while you're typing, without resorting to the mouse etc? I'm a bit new to Confluence, but....
Many thanks
As an aside, I'm looking to do this in a cloud-based instance, so we don't have html macro available there :-(
You (or your admin) can add the HTML macro to your Confluence instance.
Spot on, the markup used by Atlassian is bad. MS Teams, GitHub, Slack and nearly everything in inline code snippet is as simple as using back-ticks. Why does Atlassian think they need their own version of Markup? ...why not use something already tried and true; that actually is useful!
Thanks for opening up that ticket Ed. Nice to see that Atlassian has taken this soo seriously that it has been sitting for nearly two years and still awaiting verification. That's Atlassian's way of saying thanks for using our product and giving feedback/opening an issue... we just don't care! More reason to move to another platform; although I'm tied to this at work but I use better products for all projects outside of my 9-5.
it has been mentioned before, I summarize it again:
In the new editor experience of Confluence (tested on Cloud Edition) you can use CTRL+SHIFT+m to trigger monospace formating. It will have a grey background and will look like inline code.
Also you can use `my inline code` (backticks) to trigger the monospace formating.
See the documentation on keyboard shortcuts
the new editor experience allows formating via backticks (e.g. `my inline code`). You can also select your inline code and press CTRLSHIFT+m on Windows.
on the Mac, it's cmd+shift +m, but it does not render highlights, only monospace. Does the highlighting render on Windows?
Yes, the background is highlighted with a light grey color.
I'm seeing no highlight on Windows
`block`
Friends,
This did it for me.
Double mustaches do the trick just like the famous Houdini (whose mustache never appeared because... well, Houdini).
{{inline code thing}}
If you need anything more advanced, I saw examples of this:
{code:SQL} <some SQL here> {code}
This is the only one that works for me. Thank you!
It looks like you're new here. Sign in or register to get started.