Hi,
I have currently added the following code as custom HTML to force a line break.
.codeContent .syntaxhighlighter table td.code .container .line {white-space: normal!important;}
There has been an update to the code block macro: https://confluence.atlassian.com/doc/code-block-macro-139390.html
I would like to have “Turn on wrap” activated when loading the page.
Can a CSS specialist help me customize the custom HTML?
Best RegradsRalf
Hi @Ralf Fehling
I haven't tested this, but have you tried
word-wrap: break-word;
Hello Shawn Doyle,thanks for the feedback.
The structure has changed. It is no longer displayed in a table.
I have tried the following code today. Unfortunately, it does not activate the desired behavior.
code[class*="language-"] { white-space: pre-wrap !important; word-break: break-word !important;}
This data is used when the function is deactivated.
style Attribut { white-space: pre;}
And this data when the function is activated.
style Attribut { white-space: pre-wrap; word-break: break-word;}
Best RegardsRalf
ah, I see what you mean, try changing the table and td reference to text. Again, not tested.
.codeContent .syntaxhighlighter .text .container .line {white-space: normal!important;}
Otherwise, open up the source for the page with the macro and see what section it is putting your codeblock into, then add that.
Thank you. For your information, the code does not work.
Here are two pictures to clarify the change.
Old
New
It looks like you're new here. Sign in or register to get started.