Note: An alternative skin, TW4MW (work in progress), is available from the user preferences.
Configuration Options
TiddlyWiki Community Wiki
The options under the options slider and in AdvancedOptions are stored in browser cookies. So if you sometimes lose your cookies or you are working on your TiddlyWiki on several computers then it can be tiresome to have to enter your options time and time again.
This page explains how you can set the default options in your TiddlyWiki once and for all. The way it's done is to create your own little "plugin" that contains some javascript code to set the default options.
Contents |
[edit] A small example
For example, say you always wanted AutoSave to be switched on.
- Create a new tiddler.
- Give it some appropriate name, for example "ConfigTweaks", "ConfigOverride" or "SetDefaultOptions". (In order to ensure that this tiddler is processed after all plugins are loaded, the name of this tiddler should start with a "z".)
- Add the following lines:
//{{{
config.options.chkAutoSave = true;
//}}}
- Give the tiddler a tag of systemConfig.
- Click Done to save the tiddler and click 'save changes' to save your TiddlyWiki.
Now, once you save and reload your TiddlyWiki, AutoSave will default to "on". You can still switch off AutoSave with the normal checkbox, and your browser will remember that in a cookie, but you've changed the default, so if you use a different computer, or your browser loses it's cookies, AutoSave will be "on".
[edit] Set multiple options
You can set multiple options in your SetDefaultOptions tiddler. This example sets my user name to MisterT, switches off backups, switches on auto-saving and switches off the read only over HTTP option:
config.options.txtUserName = "MisterT"; // instead of "YourName" config.options.chkHttpReadOnly = false; // allow edit buttons when viewed over HTTP readOnly = false; // allow edit buttons when viewed over HTTP -- for TiddlyWiki v2.2+ only // options for saving.. config.options.chkSaveBackups = false; // don't do backups config.options.chkAutoSave = true; // AutoSave whenever I edit
You can see that many options are set to either true or false. Some options, like txtUserName, should be set to a string in "double quotes".
This example also shows that you can add comments to the tiddler using two backslashes //. Anything that follows two slashes, up to the end of the line, will be ignored.
[edit] Options that can be set
This list shows all the options available in TiddlyWiki 2.1.x, and shows their defaults. Later versions might use other options. You can see what they all are by doing a "view source" on your TiddlyWiki an scrolling down about a page until you see config.options = {
config.options.chkRegExpSearch = false; // default false config.options.chkCaseSensitiveSearch = false; // default false config.options.chkAnimate = true; // default true config.options.txtUserName = "YourName"; // default "YourName" config.options.chkSaveBackups = true; // default true config.options.chkAutoSave = false; // default false config.options.chkGenerateAnRssFeed = false; // default false config.options.chkSaveEmptyTemplate = false; // default false config.options.chkOpenInNewWindow = true; // default true config.options.chkToggleLinks = false; // default false config.options.chkHttpReadOnly = true; // default true readOnly = false; // default true when viewed over HTTP, false when used locally -- for TiddlyWiki v2.2+ only showBackstage = true; // default false when viewed over HTTP, true when used locally -- for TiddlyWiki v2.2+ only config.options.chkForceMinorUpdate = false; // default false config.options.chkConfirmDelete = true; // default true config.options.chkInsertTabs = false; // default false config.options.txtBackupFolder = ""; // default "" config.options.txtMainTab = "tabTimeline"; // default "tabTimeline" config.options.txtMoreTab = "moreTabAll"; // default "moreTabAll" config.options.txtMaxEditRows = "30"; // default "30" config.options.chkAnimate = false; // default true
Furthermore, the date format can be specified by changing the default variables:
config.views.wikified.dateFormat = "YYYY-0MM-0DD 0hh:0mm"; // "created" and "modified" timestamps in the tiddler display config.macros.timeline.dateFormat = "YYYY-0MM-0DD (ddd)"; // dates in the timeline
For specifiying the format of the timestamps, see Date Formats.
[edit] Cookies still set, but ignored
During document startup, TiddlyWiki reads cookie-based option settings first, so that these values are available to plugins while they are being loaded and initialized. Then, when a configuration tiddler (i.e., a plugin as shown above) sets a specific value for a config.options.* variable, the plugin-based configuration setting will OVERRIDE the corresponding cookie-based setting. As a result, even though cookie-based settings are still stored in your browser, some of those values will ignored each time you reload the document and the fixed-value settings in the configuration tiddler are applied.
[edit] See Also
- CookieManagerPlugin: review/add/delete option cookies and save current option values to CookieJar tiddler for 'sticky' settings
- Dev:UseCasesOptions: use-cases for options to explore issues of using Cookies

