TikZ style attribute for adding default node text?

Is there a TikZ style attribute for adding default text to a node? For instance, I want to be able to do something like the following:

\begin{tikzpicture}[%
stuff/.style={%
draw,
text=Bla bla
},
]

\node at (0,0) [stuff] {};
\node at (0,1) [stuff] {};
\node at (0,2) [stuff] {};
\node at (0,3) [stuff] {};
\end{tikzpicture}


to produce a picture containing 4 nodes, each with the text "Bla bla". I want to be able to create nodes with the same text without having to add it manually.

-
I once looking into something like that. I can't remember the final outcome just now, but it wasn't very positive. This requires some serious hacking of the TikZ internals. –  Martin Scharrer Nov 13 '11 at 19:53
As a workaround, you could perhaps use a loop to make the nodes, iterating over coordinates. –  Torbjørn T. Nov 13 '11 at 20:02
@TorbjørnT.: Yes, that would be the most reasonable solution in most instances, but I've encountered numerous situations where that's not possible because the nodes are not placed in areas where a \for can be used. –  gablin Nov 13 '11 at 20:53
For yet another alternative solution see Default node text with fill color –  percusse Mar 22 '12 at 11:45

It's not exactly what it was designed for, but you can add fixed text to the font parameter:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[%
stuff/.style={%
draw,
font={A}}
]

\node at (0,0) [stuff] {};
\node at (0,1) [stuff] {};
\node at (0,2) [stuff] {};
\node at (0,3) [stuff] {};
\end{tikzpicture}

\end{document}


-
If there were a "sneaky" badge, this would be my candidate for it. –  Loop Space Nov 13 '11 at 21:53
Also see tikzstyle default node text with fill color which provides a detailed explanation of the "hooks" available. –  Peter Grill Mar 22 '12 at 15:17
Do you try align=right,font={$x+2$\\very bad idea }? –  Alain Matthes Mar 22 '12 at 22:48
@Altermundus Well, it's already a trick, so expecting to put a \\ inside is asking for trouble. :) –  Alan Munn Mar 23 '12 at 0:34

TikZ 3.0 introduced node contents option which replaces {...}

And another example to easily test it

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[%
stuff/.style={%
draw,
node contents={A}}
]

\node at (0,0) [stuff];
\node at (0,1) [stuff];
\node at (0,2) [stuff];
\node at (0,3) [stuff, node contents={B}];
\end{tikzpicture}

\end{document}


-