Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Making the code block collapsible in the v2 editor

Is there a way to make the code block collapsible in the v2 editor? i can't find an option for it, and it needs to be collapsible, since the json im putting in there is 6000 lines long

17 answers

1 accepted

6 votes
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 26, 2019

Hello Mat,

Thank you for bringing this up. It's not yet possible while we roll about the new editor, but we have a feature request below that would include that:

  • CONFCLOUD-66437 Allow further customization of the "Code" macro in the new editor

Please vote on the feature request and you will be automatically added to the list of watchers.

As a workaround, you might want to attach the code in a text file with a preview snippet using the code block macro.

Let me know if you have any further questions about that.

Regards,

Shannon

Deleted user Feb 05, 2020

@Shannon S Hi there -- it looks like I can no longer insert the Code block macro in confluence pages....and thus cannot make collapsible...is this true?

Like smingolelli likes this
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 06, 2020

Hi Colin,

Welcome to Atlassian Community! It's nice to meet you.

The Code macro has replaced the original Code Block macro. The Code Block Macro was the one that has the ability to collapse, the Code macro does not.

The feature request I shared with Mat earlier would hopefully include a collapsible option for the new Code macro.

Can you confirm that you're able to insert the Code macro using the slash / command in the new editor?

Regards,

Shannon

Like smingolelli likes this

This should not be classified as feature suggestion, it should be a bug because it is very frustrating to use the editor v2 when it lacks in such a trivial functionality like collapsibility and this was preset in v1.

Like # people like this
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 11, 2020

Hi Alexandra,

Thank you for following-up on this thread. I agree that the Code macro is definitely lacking in comparison to the Code Block macro.

However, the Code macro is a different macro entirely, thus the feature request for the missing capabilities that were offered in the former Code Block macro. 

There are multiple other missing features in the new version of the editor, so if you encounter anything else you find that is sorely lacking, you can compare with our Confluence Cloud Editor Roadmap to see if it's a feature we plan to include in the future.

Take care,

Shannon

Like # people like this

As a workaround for a shitty new editor, I've put a code block inside an "Expand" element.

Like # people like this
They still have code blocks in the comments though!

But they don't expand...

Like # people like this
Like # people like this

Doesn't even let me to put the code snippet inside the expand block :facepalm:

Like # people like this

@Darina Voloshyna may I ask if you managed to solve this issue? As I have faced the same now :( cannot add  code  inside  expand block

It is working only if it is not inside the table or other element. Just the expand block in a root of the document, and code block inside of it. But doing so inside the table won’t work :(

Like # people like this

Thanks for prompt response @Darina Voloshyna !

P.S.: that's a pity to hear though (((

Not being able to remove line numbers makes my table of functions look horrible

Like # people like this

We're over 3 years out from the initial ask. I'd say this is normal for Atlassian, but it's actually advanced. Here, they've decided to close both issues asking (so far), this implying the finality in the reduced feature set of our "upgrade".

As usual, it feels like Atlassian is begging for competition that somehow hasn't shown up yet.

Like # people like this

I was able to use the code block inside an expanable block which worked great.

However, it still doesn't work when the expand macro is used within a table.

Just adding my voice... collapsible code blocks were really useful... kept a page legible... people see a huge long page.. they dont read... if they dont read they give up and dont learn.

Needs to go in.. seriously needs to go in 

 

)

couldn't agree more. They are obviously not in sync with their users

Like # people like this

Atlassian remove existing functionality as part of upgrade.  Users request to fix, results in a feature "suggestion".  2 years later they are still considering it.

Fireman lights a house on fire.  The occupant calls to the fireman for help.  Fireman commences thinking about what should happen next...

In case it isn't clear, we are the occupants of the house that is on fire.  Atlassian, are you even listening any more?

OMG - it keeps getting worse.  Formerly I used the code in an expand block workaround, now this does not work in tables.

Way to drive it into the ground, Atlassian!

I just ran into this same problem. Its ridiculous.

Like # people like this

Checking in August; any updates on this yet?

Checking in October 2020, any updates on this yet?

The question is:

  • how do we make a code block collapsible in the new editor?

Update? No Atlassian doesn't appear to care. The only solution I am aware of is to put a code macro inside an expand macro.

Like # people like this

And why was this "Solved"? They still haven't fixed anything.

Like # people like this

+1 They have managed to remove the most useful feature...

And marked the feature request as solved :(

Like # people like this

It is bad to remove a good feature when upgrading something

Why Atlassian take it away?  That's stoopid.

Like # people like this

The same, doesn't work in tables, when trying to put code block into expand block.

Same, works outside the table but not inside the table, I wonder if there is a report specifically for this.

It is still not even taken into consideration (gathering interest) - please vote for it, maybe they'll eventually hear the plea...

https://jira.atlassian.com/browse/CONFCLOUD-72003

Yet still long way to go...

image.png

Juli 2021 ... Still waiting for this.

Confluence / @Shannon S any news on that?

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 16, 2021

Hi Sebastian,

Thank you for your reply. I looked into the request, and as of April, there's an updated version of this request. This includes the requirement for collapsible code blocks. 

You can follow that here:

  • CONFCLOUD-72003 Allow further customization of the "Code" macro in the new editor (Different background color & ability to collapse the code block)

  Thank you again for your feedback, and take care.

Shannon

Is the code block collapsable workaround? why did they mark it as solved? It's frustrating!!!

0 votes
pablo.lunavelasco@plexus.es
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Sep 04, 2023

It shouldnt be a problem. Redmine and other markdown tools have this functionality apparently with simplicity:
[[collapse(show,hide)
text to collapse
]]

Why this is so complicated to atlassian?

0 votes
Liad Ben Ari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Aug 23, 2023

If this is solved, why is it still not working
I want a table to have a collapsible code block

Atlassian why are you doing this to me???

This is clearly a bug.  Any significant technical design requires large code blocks but without the collapse feature, the document becomes TL;DR  - this is a bad dog moment for atlassian :-(

BTW
I discovered if one has an older document that used the older code block macro, it is possible to copy that document and with it will be capability to include the older code block macro with the collapse feature.

This is a very good feature to have it removed

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events