New Code Snippet Only Has Language Setting? What about Collapse, title etc?

Jeffrey Saltzman February 6, 2020

New pages editing defaults to the new editor format with "Publish" on the top, while pre-existing pages still open in the old editor with "Publish" at the bottom and the old formatting options.

The old editor's Code Block has options for setting Collapse and title properties etc, where in the new editor Code Snippet I only see the language option.

I need such blocks to collapse and have titles visible when collapsed.

How do I do this now?

6 answers

3 votes
Lakshay Ghai July 7, 2020

It sucks not to have other options in Code Snippet

1 vote
Jeffrey Saltzman May 19, 2020

I see they mean for us to use an "Expand" block in place of the old Code Block.

There are differences, but it is what it is.

Stephen Sykes July 7, 2020

Well, the expand block doesn't display code the way it needs to be - so I now wrap a code snippet with an expand block.

More clicks more time more space in the page.  

As Einstein said, "Everything should be made as simple as possible, but no simpler."

This stepped off the cliff.

Like Márton Soós likes this
Bill OLeary September 24, 2021

This sounded like a great solution, but

The expand block doesn't seem to collapsible?

I can only set a title but no other options?

Bill OLeary September 24, 2021

I was wrong, it is collapsible, its just not sizeable... 

if i remember the old code block would at least show you a couple of lines, so you knew you could go expand it

when you wrap the snippet in an expand it just comes up as a small rectangle with the title visible so the users have to know to expand it.

Márton Soós October 2, 2021

one possible solution for this problem to add a title to the expand block sg. like "Click here.." whatever, so the reader will know what that there is sg more behind the rectangle ;)

0 votes
Robert Lauriston August 3, 2021

To make a code snippet display as a code snippet rather than as a weird collapsed thing you need to wrap an "expand block" around it?

There's no default we can set so that a code snippet is a code snippet?

0 votes
Dave Boucher October 6, 2020

Oddly, the `Code Macro Administration` is still available in the settings even though the Code Macro is no longer available.  So you can set default themes and languages in settings, but they do nothing since the Code Snippet ignores them.  Basic theming and the ability to set a default language would make Code Snippets much more usable.

Roel Vlemmings November 27, 2020

Agreed. Not having default language is a massive pain! :-(

Márton Soós December 9, 2020

Agreed, i also miss the theme thing.

0 votes
hob August 19, 2020

Not having collapse in the code macro is a huge limitation for software development companies using confluence.   They should keep the old macro in parallel with the new one if the new one is missing critical functionality.

hob August 19, 2020

Interestingly, you seem to be able to put a code block inside an expand block.  This seems to work for small code snipits, but for anything longer (e.g. 3 pages), it hangs the page, and you have to close the tab.

0 votes
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2020

@Jeffrey Saltzman  First of all welcome to the community!

You are correct about shortcoming of Code Macro in new editing experience for Confluence Cloud.

Many discussion related to this are in progress, summary of which is Atlassian want to make things simpler and is pushing new feature very carefully to new editor in Confluence, and on other side, power user like you and me are struggling.

I call it price of simplicity.

Now coming to solution, you can use various plugins available on Atlassian Marketplace for this. For example - https://marketplace.atlassian.com/apps/1214912/better-code-macro-for-confluence?hosting=cloud&tab=overview

Stephen Sykes April 10, 2020

This simply is garbage.  A perfectly usable feature is no longer usable.  Colapsable code snippets work, ones that to not collapse make documentation with code examplaes unreadable.

More of Atalssian having too much time on their hands and breaking perfectly good functionality.

We're not interested in exploring (or purchasing) community fixes to your breaks.

Like # people like this
chadmichael September 29, 2020

Exactly.  This is unusable.  I just convinced people to migrate talking about how rich the tools are ... and then I find that some of my most used tools are nerfed.

Márton Soós December 9, 2020

Hi,


You can embed your code snippet macro in an Expand macro.
What is more annoying for me (as a free Cloud user) that i cannot set the theme of the code snippet macro, even the default theme (what i can see in settings) is not reflected..
Did you experience similar phenomenon?

Does the theme thing works for you?
Br,

Marcello

Like kurt likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events