Macros like Code Block and Info appear to always be aligned with the left margin, but I would like to indent them.
I have text that is formatted in indented paragraphs and I want to use the Info macro to highlight the next paragraph but it should keep the same alignment.
I am able to achieve something like this by defining a section and columns, but it feels like a hack. Are there other alternatives
Working off @matthew's suggestion, I have found that just doing a DIV with an inline style works for me.
<div style="margin-left: 30.0px"> <codeblock> </div>
P tags with the same style around code macros get stripped when saving your changes but the DIV tags don't. At least not yet...that may change or your mileage may vary.
Thank you. This works great.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Edit the "HTML" of the content by clicking the "<>" icon in the upper right and just type it in:
<div style="margin-left: 90.0px;">This is a div with a left-margin</div>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A. I don't see such an icon. It seems like it would no longer be available in Confluence 5, and the https://marketplace.atlassian.com/apps/1210722/confluence-source-editor?hosting=server&tab=overview is unsupported. "It's unsupported because Atlassian has not had the time to maintain it. There are a lot of open bugs" https://community.atlassian.com/t5/Confluence-questions/Is-there-a-way-to-edit-the-raw-source-code/qaq-p/161318
https://community.atlassian.com/t5/Confluence-questions/HTML-Authoring-Tool-ability-to-edit-the-raw-html/qaq-p/146618
B. So a panel macro around the other macro is one option
Make border and background colors #FFFFFF. Nest panel macros to get more indent. Unfortunately, you also get more space above and below, which is terrible.
C. Another option is the bulleted list (ht: Demsky). When I wanted a macro in the midst of a bulleted list, I even managed to produce it without a bullet by using shift-enter on the previous line and then creating the macro (e.g., expand).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can add a div by typing {div and then select it from the drop-down list of macros.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was most helpful for the localized macro indents. It still blows my mind that Atlassian is so early 1990s about such basic formatting needs. :-(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The "Answer" at the top of this Question is outdated.
This solution works perfectly with the current Confluence structure. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to indent the "expanding text" macro by using a snippet of CSS as follows. This affects all the expanding text macros on the page.
.expand-control-icon { margin-left: 58px; }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What I've done is create the code block, create a bulleted list directly above the code block, copy/paste the code block onto the bulleted list, delete the original code block. Kind of hacky and it does add a bullet before the code block, but it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make a panel macro around the macro to be indented, like this:
this is code block text
(Set Border Color to #FFFFFF or white.) However, that produces 0,5" or so too much space above the macro (and slightly too little indentation for my purpose). Are there any better solutions?
Indent macro does not allow macros inside. Could somebody please write an Indent1 macro that does allow macros inside and either an indentation parameter or spaces before the Indent1 macro? Or better, the two macros suggested here: https://jira.atlassian.com/browse/CONF-38096
Anyway, Atlassian should allow macros like Code Block or Page Tree appear within text. That way I'd just need to add some spaces before them to get the indent. (also mentioned in https://jira.atlassian.com/browse/CONF-38096)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any solution will be "a hack" if you're styling the output of a macro that does not take style parameters. That being said, there are some ways to achieve this without being too invasive. The primary way I would do it is define a custom style in CSS for the macros that you want.
For example, insert a Code Block macro in your page and then view the output. You'll notice that it's inside the following div:
<div class="code panel">
As a result, if you add something like the following to your CSS, you should achieve proper indentation:
div.code.panel {
margin-left: 100px !important;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would your suggestion result in the all code blocks (within the space which uses the CSS) being indented by 100px?
Part of the problem as I see it is that the macro closes the current (indented) paragraph rather than inserting within the paragraph.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.