How do I insert pre-formatted content, sort of like boiler-plate text, into a page
Asked by Tim Penner:

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?


Answers:
author: Tim Penner
body: 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.


author: Tim Penner
body: 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.


author: Don Willis
body: 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.


author: David at David Simpson Apps
body: It sounds like you want a custom Blueprint.

Here's a tutorial: [Write a simple Confluence Blueprint plugin](https://developer.atlassian.com/display/CONFDEV/Write+a+simple+Confluence+Blueprint+plugin)

comments: author: Tim Penner
body: 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.


Tags: blueprint

stylesheet

template