Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Code block macros defaulting to last used Syntax Highlighting and Theme - Confluence 4

Alan Bowman October 31, 2011

Using the WYSIWIG editor in Confluence 4, I am finding that all my code blocks default to whatever settings I use on the most recent code block.

For example, I have some code blocks for file system navigation. I want those to be one type of syntax highlighting and theme. I also have code blocks that are the internal contents of a file, and I want those to be a different type of syntax highlighting and theme.

What I find is that ALL the code blocks on the page will use whatever syntax highlighting and theme that I apply to the last code block on the page, instead of the syntax and theme that they were originally set for. If you look at the code blocks in the editor, the language and theme have not changed, but how they are displayed has changed.

Is this the expected behavior? I would very much like to be able to specify the syntax and theme for each code block at an individual level, instead of it being global.

1 answer

1 vote
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2011

It's a known bug in the code macro - it's not possible to have code macros with multiple styles on the one page - https://studio.plugins.atlassian.com/browse/NCODE-82

Alan Bowman November 1, 2011

Is there a way to reopen that bug so that it's no longer in Resolved/Won't Fix status, or to at least document this somewhere that isn't hidden in a bug report? That bug didn't show up in my searches for this issue, nor is it mentioned here: http://confluence.atlassian.com/display/DOC/Code+Block+Macro

I'm also having the same issue as many of the current commentors on that page are having, where all my indentation gets removed when pasting into the code block. Is there a bug report open for this?

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2011

I've re-opened https://studio.plugins.atlassian.com/browse/NCODE-82 to track it again.

I think there are some white-space/indenting related bug reports in the NCODE project - try having a search and see if you can find any.

HGDN Administrator September 1, 2015

My problem is slightly different -- I am getting different indenting of code blocks on the same page, and it is never the way I want it. This is a very undesirable loss of functionality in the WYSIWYG editor.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events