I have placed the ALL of the script, for SetTiddlerColumns (see
below),
in a tiddler of the same name, and tagged it with systemConfig.
I get this error message: SyntaxError: unterminated regular expression
literal
(I did type the number 2 into the field, that the script provides, as
well)
------------
/%
|Name|SetTiddlerColumns|
|Source|
http://www.TiddlyTools.com/#SetTiddlerColumns|
|Version|1.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|
http://www.TiddlyTools.com/#LegalStatements <br>and
[[Creative Commons Attribution-ShareAlike 2.5 License|http://
creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires||
|Overrides||
|Description|use CSS3 "-moz-column-count" to set single or multi-
column tiddler layout|
usage: <<tiddler SetTiddlerColumns>>
credits: Much thanks to "maki" (
www.makiaea.org) for pointing out the -
moz-column-* attributes.
Important note: these CSS3 features are not supported in
InternetExplorer.
%/<script>
// init option value (as needed) and set CSS3 column attribute on
tiddlerDisplay/storyDisplay
if (config.options.txtTiddlerColumns==undefined)
config.options.txtTiddlerColumns="1";
var td=document.getElementById("tiddlerDisplay"); // for TW2.1.x and
earlier
if (!td) td=document.getElementById("storyDisplay"); // for TW2.2+
td.style.MozColumnCount=config.options.txtTiddlerColumns;
</script>tiddler columns: {{smallform{<<option
txtTiddlerColumns>><script>
var t=place.lastChild
t.style.width="4em";
t.style.textAlign="center";
t.value=config.options.txtTiddlerColumns;
if (config.browser.isIE) {
t.disabled=true;
t.value=1;
t.title="Sorry, multiple column tiddler display is not supported in
Internet Explorer";
return;
}
// hijack onchange for this field so CSS can be updated on the fly
t.coreOnChange=t.onchange;
t.onchange=function() {
// call original core onchange handler
if (this.coreOnChange) this.coreOnChange();
// set CSS3 column attribute
var td=document.getElementById("tiddlerDisplay"); // for TW2.1.x
and earlier
if (!td) td=document.getElementById("storyDisplay"); // for TW2.2+
td.style.MozColumnCount=this.value;
// sync any option field that is showing txtTiddlerColumns value
var nodes = document.getElementsByTagName("input");
for(var t=0; t<nodes.length; t++)
if(nodes[t].getAttribute("option")=="txtTiddlerColumns")
nodes[t].value=this.value;
};
</script>}}}
-----------------
So how exactly does this Set Tiddler Column script work. As I type
does it automatically divide the text into columns on the page? Or is
there something else that I need to do?
RC