Here's the scenario:
You're designing a web application or site, and you need to flow-in some text to test your design. Do you manually flow-in text and then manually back it out? Or do you have a script to do the flowing for you?
Alessandro (and I agree) voted for the later.
Alessandro's script is lean, clean, and useful, but it required that you add/change ID tags for each element into which you wish to flow text. Which is a serious draw-back, in my opinion, as many designers use IDs extensively, and having to change each of these just to test something seemed unwieldy.
I got to thinking... what we really need is something that is easy to use and _doesn't_ impact the bones of the template in question. So I chatted with a couple of friends of mine: Aaron Shafavoloff and Paul Huff, and we came up with what we think is a better implementation of Alessandro's excellent idea.
I guess it depends on your workflow... but I already insert small holder text in all of my templates... "[PAGE TITLE]", "[BODY TEXT]", and so on... so swapping those (which have limited use) for another short tag which will give me a lot more functionality seems like a no-brainer.
So what does the tag look like?
[FILLER TEXT (recipe)]
Here are some examples:
- [FILLER TEXT]
- [FILLER TEXT 25w]
- [FILLER TEXT 3 x 25w]
- [FILLER TEXT 3P x 25w]
- [FILLER TEXT 3P.body x 25w]
- [FILLER TEXT 3P.body]
[FILLER TEXT] gives you a random amount of text. That's it. Reload the page, and the text changes.
[FILLER TEXT 3P.body] fills three body PARAGRAPHs filled with a random amount of text.
Of course, you could insert any ELEMENT, or any ELEMENT.class, or any quantities... all that is required is that the items be in-order — (element declaration) followed by (word count); that the word count be followed by a "w"; that the two declarations are separated by an "x"; and that the whole shebang is prefaced by FILLER TEXT (case sensitive).
And the great thing is that these can be easily grepped and ripped-out when testing is done.
Here's a (very) basic test HTML document: BEFORE and AFTER
This is the first public beta... so test away, and let us know if you have any problems.
UPDATE: The previous links have been updated to reflect a new home for the files. Should these ever fail, you can always find the Filler Text project at SourceForge.