It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I insert pre-formatted content, sort of like boiler-plate text, into a page

Let's say I have some stylized lists I want people to use. One style is just good ol' bullets, with indented text between the bullets. Then there are numbered lists, again with paragraphs and perhaps secondary bullets. Another is a set of instructions with a Title (how to do this or that), a set of steps indented and numbered, with indented explanation paragraphs between them, and maybe sub-steps - there might even be bullets in there. Another distinct possibility is a table with a very particular format, say one of three different formats that we want to use, depending on the information carried in the table.

The writer must be able to edit the text, add more steps and explanations, or more rows, etc. Well, I can't do it with a macro (can I? Can a macro just throw editable text into a page? And cease to be a macro after that?). I can't employ re-usable pages (because you can't edit them). I don't want people to have to go to a space that contains template-like boilerplates and copy them in piece by piece. I can control appearance of individual blocks with custom css and the "class=" construct in Confluence markup. But that's kind of icky and only works one line at a time, not for a whole bunch of classes stuck together like a complex list or table.

How do people do this?

4 answers

1 accepted

0 votes
Answer accepted

There's only a subtle difference between boiler plate and templates, which I am loathe to explain. I think I'll let this one go.

It sounds like you want a custom Blueprint.

Here's a tutorial: Write a simple Confluence Blueprint plugin

I'm working with an experienced doc team that's been using Framemaker for many years. We use the Framemaker equivalent of blue prints, book templates, that provide the structure and guidance for producing new documents. Within that framework, we need to control the style of sections. With an advanced authoring environment, such as framemaker, we have some 40 predefined paragraph styles, plus tables, and cross-reference style definitions. These need to be chosen for application at any point without regard for the overall structure of the book or a chapter within the book.

Using a blueprint would layout the basic structure of the documentation. To use it to create the formatted sections would require copying section templates, according to type, from wherever they are kept in the blueprint pages into the locations where they are required. This copying and pasting approach would work, but transform what we presently consider to be a reasonably fluid authoring workflow into a lot of jumping around from page to page.

Worse, when we have existing raw text from other sources that we re-format, we would be faced with pasting it piecemeal into the section template. The current approach involves simply choosing the styles to apply to the raw text from the style catalog. Confluence offers only 9 predefined styles.

Thanks for your suggestion, but I'm pretty certain that blue prints, while useful for creating document types, would not be useful for ad hoc styling within pages.

0 votes
Don Willis Atlassian Team Jul 08, 2014

I don't know of a way to do what you want in raw Confluence but it's a nice idea.

Somebody could build an extension to do it fairly easily either for Confluence or perhaps for your browser.

You could maybe even just use javascript bookmarklets or greasemonkey.

Based on what I've heard so far, there's currently no way to get tightly controlled styles into Confluence content without authoring directly in the underlying xml. I've submitted a feature request to allow direct control over the paragraph style dropdown in the wysiwyg editor, but that will be some time coming. With this question, I was looking for the work-around. So, we (my team) must decide whether we can live with the 9 styles that Confluence provides or we do some of our finer styling in xml. Considering what I do in mediawiki, it's not so bad, but I live much closer to the techy side of life than most authors.

One thing for sure: It will greatly benefit Atlassian, Confluence and users/customers if Atlassian tightens the styling act in Confluence. For a tool of this magnitude and apparent maturity to provide no satisfactory styling solution to all those xml and Framemaker freaks who seek collaborative documentation solutions is a terrible shame. Templates and Blueprints are great tools for "controling" the authoring behaviour of teams. The next step is tight styling.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

4,120 views 4 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you