Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
<html><p><kbd> 0 <text><br /> 1 <delay><br /> 2 <textColor><br /> 3 <width><br /> 4 <height><br /> 5 <bkColor><br /> 0x****** color-code<br /> blue<br /> green<br /> red<br /> orange<br /> white<br /> black<br /> gray<br /> purple<br /> yellow<br /> 6 <ico><br /> 7 <onClick> <br /> <any> ... on any click<br /> <left> ... on left mouse button<br /> <right> ... on right mouse button<br /> <includeButton> ... process clicks on button, too<br /> you may enclose commands in <shellOpen> (shell execute, verb: open) or <internal> (nested notification commands)<br /> 8 <untilProcessExists><br /> 9 <untilProcessClose><br /> 10 <noDouble> ... if <>"", a notification will only be genereated if its signature (cmd-params) is unique. If it is not, the handle of the existing notification with the same signature will be returned (there can't be many, since they would all need at least noDouble<>"" to be equal,).<br /> 11 <untilClick><br /> <any> ... on any click<br /> <prim> ... on left mouse button<br /> <sec> ... on right mouse button<br /> <includeButton> ... process clicks on button, too<br /> 12 <beep><br /> <string> ... freq;duration|freq;duration|...<br /> <repeat> ... number of repetitions<br /> <pause> ... pause between repeats<br /> <shake> ... shake notification on beep<br /> 13 <x><br /> 14 <y><br /> 15 <talk><br /> [string] and nothing else<br /> <string>string</string><br /> <repeat>number or "" for infinity</repeat><br /> <pause>pause between talk</pause><br /> use %text% as string to say what's enclosed in <text><br /> <br /> 16 <font><br /> 17 <fontSize><br /> 18 <trans> transparency<br /> 19 <focus> grabs focus if <>"" <br /> 20 <audio> plays back an audio-file<br /> <path> ... path to sound file<br /> <repeat> ... number of repetitions<br /> <pause> ... pause between repeats<br /> <maxVol> ... maximize volume before playback<br /> <overwriteMute> ... overwrites mute<br /> <shake> ... shake notification on playback<br /> 21 <replaceVar> if <>"" variables in all options will be replaced by _stringReplaceVariables<br /> 22 <avi> path to show specific avi, empty to show no avi<br /> 23 <run><br /> <cmd> ... you may enclose a command in <shellOpen> (shell execute, verb: open) or <internal> (nested notification commands)<br /> <repeat><br /> <pause><br /> 24 <progress> ... <>"" --> show bar<br /> 25 <button><br /> one button: <button><1><label>test</label><cmd>notepad</cmd></1></button><br /> three buttons: <button><br /> <a><label>test</label><cmd>notepad</cmd></a><br /> <d><label>test2</label><cmd>notepad</cmd></d><br /> <third><label>test3</label><cmd>notepad</cmd></third><br /> </button><br /> you may enclose commands in <shellOpen> (shell execute, verb: open) or <internal> (nested notification commands)<br /> 26 <winHandle><br /> 27 <reply><br /> <pipe> set to <>"" and provide a valid pipe name if you want a pipe reply<br /> <stdout> set to <>"" if you want an stdout reply<br /> 28 <dispatcherArea> ... overwrite config; [screen1|screen2|screen3 …|x,y,width,height]<br /> 29 <startPos> ... overwrite config; [upperleft|upperright|lowerleft|lowerright|x,y] … relative to dispatcherArea<br /> 30 <direction> ... overwrite config; [down,right|down,left|up,right|up,left] … relative to startPos<br /> 31 <delete> ... deletes winHandle, all other arguments are ignored (.exe <delete>0x000000</delete>)<br /> 32 <update> ... if you want to explicitly declare an update (else any request with <winHandle> <> "" will force an update of all attributes of this notification according to the parameters you provided) you may enclose your request in <update> (<update>[request]</update>)<br /> 33 <createIfNotVisible> ... <>"": If you update a notification declaring a winhandle and it's not visible this will automatically fall back to creating a new one. This will not work with update, since only part of the signature of the notification is provided (doesn't make sense).<br /> =="" (default): no auto create<br /> <br /> example: <update><winHandle>0x000000</winHandle><text>hello :-)</text></update> will change the text of 0x000000, but will leave all other attributes unchanged<br /> </kbd></p></html>
/***
|Name|DisableWikiLinksPlugin|
|Source|http://www.TiddlyTools.com/#DisableWikiLinksPlugin|
|Version|1.6.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|selectively disable TiddlyWiki's automatic ~WikiWord linking behavior|
This plugin allows you to disable TiddlyWiki's automatic ~WikiWord linking behavior, so that WikiWords embedded in tiddler content will be rendered as regular text, instead of being automatically converted to tiddler links. To create a tiddler link when automatic linking is disabled, you must enclose the link text within {{{[[...]]}}}.
!!!!!Usage
<<<
You can block automatic WikiWord linking behavior for any specific tiddler by ''tagging it with<<tag excludeWikiWords>>'' (see configuration below) or, check a plugin option to disable automatic WikiWord links to non-existing tiddler titles, while still linking WikiWords that correspond to existing tiddlers titles or shadow tiddler titles. You can also block specific selected WikiWords from being automatically linked by listing them in [[DisableWikiLinksList]] (see configuration below), separated by whitespace. This tiddler is optional and, when present, causes the listed words to always be excluded, even if automatic linking of other WikiWords is being permitted.
Note: WikiWords contained in default ''shadow'' tiddlers will be automatically linked unless you select an additional checkbox option lets you disable these automatic links as well, though this is not recommended, since it can make it more difficult to access some TiddlyWiki standard default content (such as AdvancedOptions or SideBarTabs)
<<<
!!!!!Configuration
<<<
<<option chkDisableWikiLinks>> Disable ALL automatic WikiWord tiddler links
<<option chkAllowLinksFromShadowTiddlers>> ... except for WikiWords //contained in// shadow tiddlers
<<option chkDisableNonExistingWikiLinks>> Disable automatic WikiWord links for non-existing tiddlers
Disable automatic WikiWord links for words listed in: <<option txtDisableWikiLinksList>>
Disable automatic WikiWord links for tiddlers tagged with: <<option txtDisableWikiLinksTag>>
<<<
!!!!!Revisions
<<<
2008.07.22 [1.6.0] hijack tiddler changed() method to filter disabled wiki words from internal links[] array (so they won't appear in the missing tiddlers list)
2007.06.09 [1.5.0] added configurable txtDisableWikiLinksTag (default value: "excludeWikiWords") to allows selective disabling of automatic WikiWord links for any tiddler tagged with that value.
2006.12.31 [1.4.0] in formatter, test for chkDisableNonExistingWikiLinks
2006.12.09 [1.3.0] in formatter, test for excluded wiki words specified in DisableWikiLinksList
2006.12.09 [1.2.2] fix logic in autoLinkWikiWords() (was allowing links TO shadow tiddlers, even when chkDisableWikiLinks is TRUE).
2006.12.09 [1.2.1] revised logic for handling links in shadow content
2006.12.08 [1.2.0] added hijack of Tiddler.prototype.autoLinkWikiWords so regular (non-bracketed) WikiWords won't be added to the missing list
2006.05.24 [1.1.0] added option to NOT bypass automatic wikiword links when displaying default shadow content (default is to auto-link shadow content)
2006.02.05 [1.0.1] wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
2005.12.09 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.DisableWikiLinksPlugin= {major: 1, minor: 6, revision: 0, date: new Date(2008,7,22)};
if (config.options.chkDisableNonExistingWikiLinks==undefined) config.options.chkDisableNonExistingWikiLinks= false;
if (config.options.chkDisableWikiLinks==undefined) config.options.chkDisableWikiLinks=false;
if (config.options.txtDisableWikiLinksList==undefined) config.options.txtDisableWikiLinksList="DisableWikiLinksList";
if (config.options.chkAllowLinksFromShadowTiddlers==undefined) config.options.chkAllowLinksFromShadowTiddlers=true;
if (config.options.txtDisableWikiLinksTag==undefined) config.options.txtDisableWikiLinksTag="excludeWikiWords";
// find the formatter for wikiLink and replace handler with 'pass-thru' rendering
initDisableWikiLinksFormatter();
function initDisableWikiLinksFormatter() {
for (var i=0; i<config.formatters.length && config.formatters[i].name!="wikiLink"; i++);
config.formatters[i].coreHandler=config.formatters[i].handler;
config.formatters[i].handler=function(w) {
// supress any leading "~" (if present)
var skip=(w.matchText.substr(0,1)==config.textPrimitives.unWikiLink)?1:0;
var title=w.matchText.substr(skip);
var exists=store.tiddlerExists(title);
var inShadow=w.tiddler && store.isShadowTiddler(w.tiddler.title);
// check for excluded Tiddler
if (w.tiddler && w.tiddler.isTagged(config.options.txtDisableWikiLinksTag))
{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
// check for specific excluded wiki words
var t=store.getTiddlerText(config.options.txtDisableWikiLinksList);
if (t && t.length && t.indexOf(w.matchText)!=-1)
{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
// if not disabling links from shadows (default setting)
if (config.options.chkAllowLinksFromShadowTiddlers && inShadow)
return this.coreHandler(w);
// check for non-existing non-shadow tiddler
if (config.options.chkDisableNonExistingWikiLinks && !exists)
{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
// if not enabled, just do standard WikiWord link formatting
if (!config.options.chkDisableWikiLinks)
return this.coreHandler(w);
// just return text without linking
w.outputText(w.output,w.matchStart+skip,w.nextMatch)
}
}
Tiddler.prototype.coreAutoLinkWikiWords = Tiddler.prototype.autoLinkWikiWords;
Tiddler.prototype.autoLinkWikiWords = function()
{
// if all automatic links are not disabled, just return results from core function
if (!config.options.chkDisableWikiLinks)
return this.coreAutoLinkWikiWords.apply(this,arguments);
return false;
}
Tiddler.prototype.disableWikiLinks_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
this.disableWikiLinks_changed.apply(this,arguments);
// remove excluded wiki words from links array
var t=store.getTiddlerText(config.options.txtDisableWikiLinksList,"").readBracketedList();
if (t.length) for (var i=0; i<t.length; i++)
if (this.links.contains(t[i]))
this.links.splice(this.links.indexOf(t[i]),1);
};
//}}}
/***
|''Name:''|FCKeditorPlugin|
|''Description:''|Wysiwyg editor for TiddlyWiki using FCKeditor.|
|''Version:''|1.1.1|
|''Date:''|Dec 21,2007|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.2.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demo:
On the plugin [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], see and edit [[WysiwygDemo]].
!Installation:
#download and unzip [[FCKeditor|http://www.fckeditor.net/download]] (by default, in a wiki subfolder, such that the relative path "fckeditor/fckeditor.js" is right).
#import [[FCKeditorPlugin]] (systemConfig tagged)
#add the following text to MarkupPreHead : {{{<script type="text/javascript" src="fckeditor/fckeditor.js"></script>}}}
#customize FCKeditorPath if needed (in MarkupPreHead and in options below)
#save and reload
#use the <<toolbar editHtml>> button in the tiddler's toolbar (in default ViewTemplate) or add {{{editHtml}}} command in your own toolbar.
! Useful Addons
*[[HTMLFormattingPlugin|http://www.tiddlytools.com/#HTMLFormattingPlugin]] to embed wiki syntax in html tiddlers.<<br>>//__Tips__ : When this plugin is installed, you can use anchor syntax to link tiddlers in wysiwyg mode (example : #example). Anchors are converted back and from wiki syntax when editing.//
*[[TaggedTemplateTweak|http://www.TiddlyTools.com/#TaggedTemplateTweak]] to use alternative ViewTemplate/EditTemplate for tiddler's tagged with specific tag values.
!Configuration options :
|FCKeditor folder (absolute or relative)|<<option txtFCKeditorPath>> |
|FCKeditor custom configuration script path (relative or absolute)<<br>>[[Example|fckeditor/editor/custom_config.js]] : {{{ fckeditor/editor/custom_config.js}}}|<<option txtFCKCustomConfigScript>>|
|Toolbar name ("Default", "Basic" or custom)<<br>>See [[FCKeditor documentation|http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Toolbar]] for more information on custom toolbars|<<option txtFCKToolbar>>|
|FCKeditor default height (if blank = 500px)|<<option txtFCKheight>>|
|Template called by the {{{wysiwyg}}} button|EditHtmlTemplate|
!Code
***/
//{{{
config.options.txtFCKeditorPath = config.options.txtFCKeditorPath ? config.options.txtFCKeditorPath : "fckeditor/";
config.options.txtFCKCustomConfigScript = config.options.txtFCKCustomConfigScript ? config.options.txtFCKCustomConfigScript : "";
config.options.txtFCKToolbar = config.options.txtFCKToolbar ? config.options.txtFCKToolbar : "";
config.options.txtFCKheight = config.options.txtFCKheight ? config.options.txtFCKheight : "500px";
config.macros.editHtml = {
handler : function(place,macroName,params,wikifier,paramString,tiddler) {
var field = params[0];
var height = params[1] ? params[1] : config.options.txtFCKheight;
if (typeof FCKeditor=="undefined"){
displayMessage(config.macros.editHtml.FCKeditorUnavailable);
config.macros.edit.handler(place,macroName,params,wikifier,paramString,tiddler);
}
else if (field) {
var e = createTiddlyElement(null,"div");
var fckName = "FCKeditor"+ Math.random();
if(tiddler.isReadOnly())
e.setAttribute("readOnly","readOnly");
e.setAttribute("editHtml",field);
if (height) e.setAttribute("height",height);
e.setAttribute("fckName",fckName);
place.appendChild(e);
var fck = new FCKeditor(fckName);
fck.BasePath = config.options.txtFCKeditorPath;
if (config.options.txtFCKCustomConfigScript) fck.Config["CustomConfigurationsPath"] = config.options.txtFCKCustomConfigScript ;
if (config.options.txtFCKToolbar) fck.ToolbarSet = config.options.txtFCKToolbar;
fck.Height=height;
var re = /^<html>(.*)<\/html>$/m;
var fieldValue=store.getValue(tiddler,field);
var htmlValue = re.exec(fieldValue);
var value = (htmlValue && (htmlValue.length>0)) ? htmlValue[1] : fieldValue;
value=value.replace(/\[\[([^|\]]*)\|([^\]]*)]]/g,'<a href="#$2">$1</a>');
config.macros.editHtml.FCKvalues[fckName]=value;
e.innerHTML = fck.CreateHtml();
}
},
gather : function(e) {
var name = e.getAttribute("fckName");
var oEditor = window.FCKeditorAPI ? FCKeditorAPI.GetInstance(name) : null;
if (oEditor) {
var html = oEditor.GetHTML();
if (html!=null)
return "<html>"+html.replace(/<a href="#([^>]*)">([^<]*)<\/a>/gi,"[[$2|$1]]")+"</html>";
}
},
FCKvalues : {},
FCKeditorUnavailable : "FCKeditor was unavailable. Check plugin configuration and reload."
}
window.FCKeditor_OnComplete= function( editorInstance ) {
var name=editorInstance.Name;
var value = config.macros.editHtml.FCKvalues[name];
delete config.macros.editHtml.FCKvalues[name];
oEditor = FCKeditorAPI.GetInstance(name);
if (value) oEditor.SetHTML(value);
}
Story.prototype.previousGatherSaveEditHtml = Story.prototype.previousGatherSaveEditHtml ? Story.prototype.previousGatherSaveEditHtml : Story.prototype.gatherSaveFields; // to avoid looping if this line is called several times
Story.prototype.gatherSaveFields = function(e,fields){
if(e && e.getAttribute) {
var f = e.getAttribute("editHtml");
if(f){
var newVal = config.macros.editHtml.gather(e);
if (newVal) fields[f] = newVal;
}
this.previousGatherSaveEditHtml(e, fields);
}
};
config.shadowTiddlers.EditHtmlTemplate = config.shadowTiddlers.EditTemplate.replace(/macro='edit text'/,"macro='editHtml text'");
config.commands.editHtml={
text: "wysiwyg",
tooltip: "Edit this tiddler with a rich text editor",
readOnlyText: "",
handler : function(event,src,title) {
clearMessage();
var tiddlerElem = document.getElementById(story.idPrefix + title);
var fields = tiddlerElem.getAttribute("tiddlyFields");
story.displayTiddler(null,title,"EditHtmlTemplate",false,null,fields);
return false;
}
}
config.shadowTiddlers.ViewTemplate = config.shadowTiddlers.ViewTemplate.replace(/\+editTiddler/,"+editTiddler editHtml");
//}}}
<html><h1>Using FP-QUICodeGenerator (recommended)<img vspace="10" hspace="10" align="right" src="images/FP-QuinterfaceCodeGeneratorGUI.png" alt="FP-QUICodeGeneratorGUI" style="width: 455px; height: 335px;" /></h1><ol><li>Start FP-QUICodeGenerator<ol type="a"><li>If you are using the portable (zipped) version, you can find the FP-QUICodeGenerator executable in the same directory where FP-QUI.exe and FP-QUICore.exe are located.</li><li>If you used the installer, there should be an entry in your start menu.</li></ol></li><li>You should now see the window on the right.</li><li>Use the graphical user interface to create a custom QUI.</li><li>When you're done click on "Copy code to clipboard".</li><li>Paste this code anywhere you like. (have a look at [[Using FP-QUI with SpeedFan]] or [[Using FP-QUI with Thunderbird]])</li></ol><h1>Manually</h1><p>see [[Command Line Interface Options]]</p></html>
Please go to http://sourceforge.net/tracker/?func=add&group_id=334382&atid=1401630 and submit a support request.
<html><p><code>git://fp-qui.git.sourceforge.net/gitroot/fp-qui/fp-qui (read-only)</code></p></html>
/***
|Name|HTMLFormattingPlugin|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.4.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|embed wiki syntax formatting inside of HTML content|
The ~HTMLFormatting plugin allows you to ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Documentation
>see [[HTMLFormattingPluginInfo]]
!!!!!Configuration
<<<
Use {{{<hide linebreaks>}}} within HTML content to wiki-style rendering of line breaks. To //always// omit all line breaks from the rendered output, you can set this option:
><<option chkHTMLHideLinebreaks>> ignore all line breaks
which can also be 'hard coded' into your document by adding the following to a tiddler, tagged with <<tag systemConfig>>
>{{{config.options.chkHTMLHideLinebreaks=true;}}}
<<<
!!!!!Revisions
<<<
2010.05.07 2.4.1 added chkHTMLHideLinebreaks option
| see [[HTMLFormattingPluginInfo]] for additional revision details |
2005.06.26 1.0.0 Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.HTMLFormattingPlugin= {major: 2, minor: 4, revision: 1, date: new Date(2010,5,7)};
// find the formatter for HTML and replace the handler
initHTMLFormatter();
function initHTMLFormatter()
{
for (var i=0; i<config.formatters.length && config.formatters[i].name!="html"; i++);
if (i<config.formatters.length) config.formatters[i].handler=function(w) {
if (!this.lookaheadRegExp) // fixup for TW2.0.x
this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var html=lookaheadMatch[1];
// if <nowiki> is present, just let browser handle it!
if (html.indexOf('<nowiki>')!=-1)
createTiddlyElement(w.output,"span").innerHTML=html;
else {
// if <hide linebreaks> is present, or chkHTMLHideLinebreaks is set
// suppress wiki-style literal handling of newlines
if (config.options.chkHTMLHideLinebreaks||(html.indexOf('<hide linebreaks>')!=-1))
html=html.replace(/\n/g,' ');
// remove all \r's added by IE textarea and mask newlines and macro brackets
html=html.replace(/\r/g,'').replace(/\n/g,'\\n').replace(/<</g,'%%(').replace(/>>/g,')%%');
// create span, let browser parse HTML
var e=createTiddlyElement(w.output,"span"); e.innerHTML=html;
// then re-render text nodes as wiki-formatted content
wikifyTextNodes(e,w);
}
w.nextMatch = this.lookaheadRegExp.lastIndex; // continue parsing
}
}
}
// wikify #text nodes that remain after HTML content is processed (pre-order recursion)
function wikifyTextNodes(theNode,w)
{
function unmask(s) { return s.replace(/\%%\(/g,'<<').replace(/\)\%%/g,'>>').replace(/\\n/g,'\n'); }
switch (theNode.nodeName.toLowerCase()) {
case 'style': case 'option': case 'select':
theNode.innerHTML=unmask(theNode.innerHTML);
break;
case 'textarea':
theNode.value=unmask(theNode.value);
break;
case '#text':
var txt=unmask(theNode.nodeValue);
var newNode=createTiddlyElement(null,"span");
theNode.parentNode.replaceChild(newNode,theNode);
wikify(txt,newNode,highlightHack,w.tiddler);
break;
default:
for (var i=0;i<theNode.childNodes.length;i++)
wikifyTextNodes(theNode.childNodes.item(i),w); // recursion
break;
}
}
//}}}
|Name|HTMLFormattingPluginInfo|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.4.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|documentation for HTMLFormattingPlugin|
The ~HTMLFormatting plugin allows you to freely ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Usage
<<<
The shorthand Wiki-style formatting syntax of ~TiddlyWiki is very convenient and enables most content to be reasonably well presented. However, there are times when tried-and-true HTML formatting syntax allows more more precise control of the content display.
When a tiddler is about to be displayed, ~TiddlyWiki looks for tiddler content contained within {{{<html>}}} and {{{</html>}}} markers. When present, the TiddlyWiki core simply passes this content directly to the browser's internal "rendering engine" to process as ~HTML-formatted content. However, TiddlyWiki does not also process the HTML source content for any embedded wiki-formatting syntax it may contain. This means that while you can use HTML formatted content, you cannot mix wiki-formatted content within the HTML formatting.
This plugin extends the TiddlyWiki core processing so that, after the HTML formatting has been processed, all the pieces of text occuring within the HTML block are then processed one piece at a time, so that normal wiki-style formatting can be applied to the individual text pieces.
Note: To bypass this extended processing for a specific section of HTML content, embed ''{{{<nowiki>}}}'' //anywhere// inside the {{{<html>...</html>}}} delimiters, and wiki formatting will not be applied to that content.
<<<
!!!!!Line breaks
<<<
One major difference between Wiki formatting and HTML formatting is how "line breaks" are processed. Wiki formatting treats all line breaks as literal content to be displayed //as-is//. However, because HTML normally ignores line breaks and actually processes them as simple "word separators" instead, many people who write HTML include extra line breaks in their documents, just to make the "source code" easier to read.
Even though you can use HTML tags within your tiddler content, the default treatment for line breaks still follows the Wiki-style rule (i.e., all new lines are displayed as-is). When adding HTML content to a tiddler (especially if you cut-and-paste it from another web page), you should take care to avoid adding extra line breaks to the text.
If removing all the extra line breaks from your HTML content would be a big hassle, you can quickly //override the default Wiki-style line break rule// so that the line breaks use the standard HTML rules, by placing ''{{{<hide linebreaks>}}}'' //anywhere// within the HTML content. This automatically converts all line breaks to spaces before rendering the content, so that the literal line breaks will be processed as simple word-breaks instead.
Alternatively, if you //always// want to omit all line breaks from the rendered output, you can set this option:
><<option chkHTMLHideLinebreaks>> ignore all line breaks
which can also be 'hard coded' into your document by adding the following to a tiddler, tagged with <<tag systemConfig>>
>{{{config.options.chkHTMLHideLinebreaks=true;}}}
Note: this does //not// alter the actual tiddler content that is stored in the document, just the manner in which it is displayed. Any line breaks contained in the tiddler will still be there when you edit its content. Also, to include a literal line break when the ''<{{{hide linebreaks}}}>'' tag is present, you will need to use a ''<{{{br}}}>'' or ''<{{{p}}}>'' HTML tag instead of simply typing a line break.
<<<
!!!!!How it works
<<<
The TW core support for HTML does not let you put ANY wiki-style syntax (including TW macros) *inside* the {{{<html>...</html>}}} block. Everything between {{{<html>}}} and {{{</html>}}} is handed to the browser for processing and that is it.
However, not all wiki syntax can be safely passed through the browser's parser. Specifically, any TW macros inside the HTML will get 'eaten' by the browser since the macro brackets, {{{<<...>>}}} use the "<" and ">" that normally delimit the HTML/XML syntax recognized by the browser's parser.
Similarly, you can't use InlineJavascript within the HTML because the {{{<script>...</script>}}} syntax will also be consumed by the browser and there will be nothing left to process afterward. Note: unfortunately, even though the browser removes the {{{<script>...</script>}}} sequence, it doesn't actually execute the embedded javascript code that it removes, so any scripts contained inside of <html> blocks in TW are currently being ignored. :-(
As a work-around to allow TW *macros* (but not inline scripts) to exist inside of <html> formatted blocks of content, the plugin first converts the {{{<<}}} and {{{>>}}} into "%%(" and ")%%", making them "indigestible" so they can pass unchanged through the belly of the beast (the browser's HTML parser).
After the browser has done its job, the wiki syntax sequences (including the "undigested" macros) are contained in #text nodes in the browser-generated DOM elements. The plugin then recursively locates and processes each #text node, converts the %%( and )%% back into {{{<<}}} and {{{>>}}}, passes the result to wikify() for further rendering of the wiki-formatted syntax into a containing SPAN that replaces the previous #text node. At the end of this process, none of the encoded %%( and )%% sequences remain in the rendered tiddler output.
<<<
!!!!!Revisions
<<<
2010.05.07 2.4.1 added chkHTMLHideLinebreaks option
2009.01.05 2.4.0 in wikifyTextNodes(), pass w.highlightRegExp and w.tiddler to wikify() so that search term highlighting and tiddler-relative macro processing will work
2008.10.02 2.3.0 added use of {{{<nowiki>}}} marker to bypass all wikification inside a specific HTML block
2008.09.19 2.2.0 in wikifyTextNodes(), don't wikify the contents of STYLE nodes (thanks to MorrisGray for bug report)
2008.04.26 [*.*.*] plugin size reduction: more documentation moved to HTMLFormattingInfo
2008.01.08 [*.*.*] plugin size reduction: documentation moved to HTMLFormattingInfo
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.06.14 2.1.5 in formatter, removed call to e.normalize(). Creates an INFINITE RECURSION error in Safari!!!!
2006.09.10 2.1.4 update formatter for 2.1 compatibility (use this.lookaheadRegExp instead of temp variable)
2006.05.28 2.1.3 in wikifyTextNodes(), decode the *value* of TEXTAREA nodes, but don't wikify() its children. (thanks to "ayj" for bug report)
2006.02.19 2.1.2 in wikifyTextNodes(), put SPAN element into tiddler DOM (replacing text node), BEFORE wikifying the text content. This ensures that the 'place' passed to any macros is correctly defined when the macro is evaluated, so that calls to story.findContainingTiddler(place) will work as expected. (Thanks for bug report from GeoffSlocock)
2006.02.05 2.1.1 wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
2005.12.01 2.1.0 don't wikify #TEXT nodes inside SELECT and TEXTAREA elements
2005.11.06 2.0.1 code cleanup
2005.10.31 2.0.0 replaced hijack wikify() with hijack config.formatters["html"] and simplified recursive WikifyTextNodes() code
2005.10.09 1.0.2 combined documentation and code into a single tiddler
2005.08.05 1.0.1 moved HTML and CSS definitions into plugin code instead of using separate tiddlers
2005.07.26 1.0.1 Re-released as a plugin. Added <{{{html}}}>...</{{{nohtml}}}> and <{{{hide newlines}}}> handling
2005.06.26 1.0.0 Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2009.04.11 [1.9.5] pass current tiddler object into wrapper code so it can be referenced from within 'onclick' scripts
2009.02.26 [1.9.4] in $(), handle leading '#' on ID for compatibility with JQuery syntax
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 5, date: new Date(2009,4,11)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var src=lookaheadMatch[1];
var label=lookaheadMatch[2];
var tip=lookaheadMatch[3];
var key=lookaheadMatch[4];
var show=lookaheadMatch[5];
var code=lookaheadMatch[6];
if (src) { // external script library
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) { // inline code
if (show) // display source in tiddler
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) { // create 'onclick' command link
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
link.code="function _out(place,tiddler){"+fixup+"\n};_out(this,this.tiddler);"
link.tiddler=w.tiddler;
link.onclick=function(){
this.bufferedHTML="";
try{ var r=eval(this.code);
if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
if(this.bufferedHTML.length)
s.innerHTML=this.bufferedHTML;
if((typeof(r)==="string")&&r.length) {
wikify(r,s,null,this.tiddler);
return false;
} else return r!==undefined?r:false;
} catch(e){alert(e.description||e.toString());return false;}
};
link.setAttribute("title",tip||"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
if (key) link.accessKey=key.substr(0,1); // single character only
}
else { // run script immediately
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
var c="function _out(place,tiddler){"+fixup+"\n};_out(w.output,w.tiddler);";
try { var out=eval(c); }
catch(e) { out=e.description?e.description:e.toString(); }
if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
}
}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
} )
//}}}
// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
if(limit > 0) text = text.substr(0,limit);
var wikifier = new Wikifier(text,formatter,null,tiddler);
return wikifier.wikifyPlain();
}
//}}}
// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
<<ToC>>
<<newTiddler>><<newJournal "DD MMM YYYY">><<saveChanges>>
<<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
PageTemplate
StyleSheet
MainMenu
DefaultTiddlers
[[SideBarTabs]]
[[SideBarOptions]]
<!--{{{-->
<!-- <<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">> -->
<!--}}}-->
!Tags
*technical
**dev
*enduser
**howto
**scenario
**feedback
*todo
*internal
*plugin
!~Todo-Tiddlers
<<tiddlerList tags:"todo">>
!Plugins
<<tiddlerList tags:"plugin">>
Aenean eros arcu, condimentum nec, dapibus ut, tincidunt sit amet, urna. Quisque viverra, eros sed imperdiet iaculis, est risus facilisis quam, id malesuada arcu nulla luctus urna. Nullam et est. Vestibulum velit sem, faucibus cursus, dapibus vestibulum, pellentesque et, urna. Donec luctus. Donec lectus. Aliquam eget eros facilisis tortor feugiat sollicitudin. Integer lobortis vulputate sapien. Sed iaculis erat ac nunc. Etiam eu enim. Mauris ipsum urna, rhoncus at, bibendum sit amet, euismod eget, dolor. Mauris fermentum quam vitae ligula. Vestibulum in libero feugiat justo dictum consectetuer. Vestibulum euismod purus eget elit. Nunc sed massa porta elit bibendum posuere. Nunc pulvinar justo sit amet odio. In sed est. Phasellus ornare elementum nulla. Nulla ipsum neque, cursus a, viverra a, imperdiet at, enim. Quisque facilisis, diam sed accumsan suscipit, odio arcu hendrerit dolor, quis aliquet massa nulla nec sem.
!heading 1
!!heading 2
!!!heading3
----
<<tag button>>
This is a link to a [[StyleSheet]] tiddler.
> This is a blockquote
> This is a blockquote
> This is a blockquote
|>|>| !This is a header |h
|column1|column2|column3|
|row2| row2 |row2|
|column1|column2|column3|
|row2| row2 |row2|
|column1|column2|column3|
|row2| row2 |row2|
[[Table of Contents|Table of Contents]]
[[FP-QUI Homepage|http://fp-qui.sourceforge.net]]
[[Get Support|http://sourceforge.net/projects/fp-qui/support]]
[[Report a Bug|http://sourceforge.net/tracker/?func=add&group_id=334382&atid=1401629]]
[[News on Twitter|http://twitter.com/FPQUI]]
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<!--}}}-->
<html><p><input type="image" style="width: 800px" src="images/layoutDesign.png" /></p></html>
<!--{{{-->
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<!-- <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div> -->
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
Please go to http://sourceforge.net/tracker/?func=add&group_id=334382&atid=1401629 and fill out the form. Thanks for your help :-).
Please visit http://sourceforge.net/tracker/?func=add&group_id=334382&atid=1401632 and fill out the form. Your feedback is greatly appreciated!
<<search>><<closeAll>><<permaview>>
/*{{{*/
/*Blackicity Theme for TiddlyWiki*/
/*Design and CSS by Saq Imtiaz*/
/*Version 1.0*/
/*}}}*/
/*{{{*/
body{ font-family: "Trebuchet MS",Arial,Helvetica,sans-serif;
background-color: #fff;
color: #333;
font-size: 8pt;}
/* #topMenu {position:relative; background:#BC8BDA; padding:10px; color:#fff;font-family:'Lucida Grande', Verdana, Sans-Serif; font-size:12pt;} */
#topMenu {position:relative; background:#BC8BDA; padding: 12px 12px 12px 12px; color:#fff;font-family:'Lucida Grande', Verdana, Sans-Serif; font-size:12pt;}
#topMenu br {display:none;}
#topMenu a{ color: #FFF;
margin: 5px 3px 5px 3px;
padding: 5px 5px 5px 5px;
text-decoration:none;
font-weight:normal;
border: 2px solid #fff;
}
#topMenu a:hover {color:#fff; background:#893AB8; border-bottom: 2px solid #fff;}
#displayArea {margin-left:1em; margin-bottom:2em; margin-top:0.5em;}
/***
!Links
***/
a, {
color:#333;
text-decoration: none;
background: transparent;
}
a:hover{
color:#333;
background:#DCC1EC;
text-decoration: none;
}
/***!Tiddler***/
.viewer a, .viewer a:hover {border-bottom:1px dotted #333; font-weight:bold;}
.viewer .button, .editorFooter .button{
color: #333;
border: 1px solid #333;
}
.viewer .button:hover,
.editorFooter .button:hover, .viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{
color: #fff;
background: #333;
border-color: #333;
}
.tiddler .viewer {line-height:1.45em;}
.title {color:#222; border-bottom:1px solid#222; font-family:'Lucida Grande', Verdana, Sans-Serif; font-size:1.5em;}
.subtitle, .subtitle a { color: #999999; font-size: 0.95em;margin:0.2em;}
.shadow .title{color:#999;}
/***
!Toolbar
***/
.toolbar {font-size:90%;}
.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#333; background:transparent;border:1px solid #fff;}
.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#333; background:transparent;border:1px solid #fff;}
/***
!Sidebar
***/
#sidebar { margin-bottom:2em !important; margin-bottom:1em; right:0;
}
/***
!SidebarOptions
***/
#sidebarOptions { padding-top:2em;background:#f3f3f3;padding-left:0.5em;}
#sidebarOptions a {
color:#333;
background:#f3f3f3;
border:1px solid #f3f3f3;
text-decoration: none;
}
#sidebarOptions a:hover, #sidebarOptions a:active {
color:#222;
background-color:#fff;border:1px solid #fff;
}
#sidebarOptions input {border:1px solid #ccc; }
#sidebarOptions .sliderPanel {
background: #f3f3f3; font-size: .9em;
}
#sidebarOptions .sliderPanel input {border:1px solid #999;}
#sidebarOptions .sliderPanel .txtOptionInput {border:1px solid #999;width:9em;}
#sidebarOptions .sliderPanel a {font-weight:normal; color:#555;background-color: #f3f3f3; border-bottom:1px dotted #333;}
#sidebarOptions .sliderPanel a:hover {
color:#111;
background-color: #f3f3f3;
border:none;
border-bottom:1px dotted #111;
}
/***
!SidebarTabs
***/
.listTitle {color:#222;}
#sidebarTabs {background:#f3f3f3;}
#sidebarTabs .tabContents {background:#cfcfcf;}
#sidebarTabs .tabUnselected:hover {color:#999;}
#sidebarTabs .tabSelected{background:#cfcfcf;}
#sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button{color:#666;}
#sidebarTabs .tabContents .tiddlyLink:hover,#sidebarTabs .tabContents .button:hover{color:#222;background:transparent; text-decoration:none;border:none;}
#sidebarTabs .tabContents .button:hover, #sidebarTabs .tabContents .highlight, #sidebarTabs .tabContents .marked, #sidebarTabs .tabContents a.button:active{color:#222;background:transparent;}
#sidebarTabs .txtMoreTab .tabSelected,
#sidebarTabs .txtMoreTab .tab:hover,
#sidebarTabs .txtMoreTab .tabContents{
color: #111;
background: #f3f3f3; border:1px solid #f3f3f3;
}
#sidebarTabs .txtMoreTab .tabUnselected {
color: #555;
background: #AFAFAF;
}
/***
!Tabs
***/
.tabSelected{color:#fefefe; background:#999; padding-bottom:1px;}
.tabSelected, .tabSelected:hover {
color: #111;
background: #fefefe;
border: solid 1px #cfcfcf;
}
.tabUnselected {
color: #999;
background: #eee;
border: solid 1px #cfcfcf;
padding-bottom:1px;
}
.tabUnselected:hover {text-decoration:none; border:1px solid #cfcfcf;}
.tabContents {background:#fefefe;}
.tagging, .tagged {
border: 1px solid #eee;
background-color: #F7F7F7;
}
.selected .tagging, .selected .tagged {
background-color: #f3f3f3;
border: 1px solid #ccc;
}
.tagging .listTitle, .tagged .listTitle {
color: #bbb;
}
.selected .tagging .listTitle, .selected .tagged .listTitle {
color: #333;
}
.tagging .button, .tagged .button {
color:#ccc;
}
.selected .tagging .button, .selected .tagged .button {
color:#aaa;
}
.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}
.tagging .button:hover, .tagged .button:hover, .tagging .button:active, .tagged .button:active {
border: none; background:transparent; text-decoration:underline; color:#333;
}
.popup {
background: #cfcfcf;
border: 1px solid #333;
}
.popup li.disabled {
color: #000;
}
.popup li a, .popup li a:visited {
color: #555;
border: none;
}
.popup li a:hover {
background: #f3f3f3;
color: #555;
border: none;
}
#messageArea {
border: 4px dotted #282826;
background: #F3F3F3;
color: #333;
font-size:90%;
}
#messageArea a:hover { background:#f5f5f5; border:none;}
#messageArea .button{
color: #333;
border: 1px solid #282826;
}
#messageArea .button:hover {
color: #fff;
background: #282826;
border-color: #282826;
}
.tiddler {padding-bottom:10px;}
.viewer blockquote {
border-left: 5px solid #282826;
}
.viewer table, .viewer td {
border: 1px solid #282826;
}
.viewer th, thead td {
background: #282826;
border: 1px solid #282826;
color: #fff;
}
.viewer pre {
border: 1px solid #ccc;
background: #f5f5f5;
}
.viewer code {
color: #111; background:#f5f5f5;
}
.viewer hr {
border-top: dashed 1px #222; margin:0 1em;
}
.editor input {
border: 1px solid #ccc; margin-top:5px;
}
.editor textarea {
border: 1px solid #ccc;
}
h1,h2,h3,h4,h5 { color: #282826; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}
/*}}}*/
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent}
h1 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected{color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background::[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
.ToC {
float: left; /* auto-width */
margin: 0 2em 2em 0;
border: 1px solid #aaa;
padding: 5px;
background-color: #eee;
}
.ToC ol {
margin: 0 1em;
}
h1 {
clear: left;
}
/*}}}*/
!End-user
<<tiddlerList tags:"enduser">>
!Technical
<<tiddlerList tags:"technical">>
[[.|Internal]]
/***
|''Name:''|TiddlerListMacro|
|''Version:''|2.3 (8-Jan-2008)|
|''Source''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23TiddlerListMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
|''Documentation:''|[[TiddlerListMacroDocumentation]]|
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
See TiddlerListMacroDocumentation and TiddlerListMacroExamples
!Code
***/
//{{{
version.extensions.tiddlerList = {major: 2, minor: 3, revision: 0, date: new Date("Jan 08, 2008")};
// template = [header, item, separator, group, footer]
config.macros.tiddlerList={
formats : {list:true, nlist:true, span:true, stack:true, csv:true, table:true},
templates : {
list : [ "%0\n", "* %0\n", "", "%group\n", "%0\n"],
nlist : [ "%0", "# %0\n", "", "%group\n", "%0\n"],
span : [ "%0", "%0", " ", "%group", "%0"],
stack : [ "%0", "%0", "\n", "%group", "%0"],
csv : [ "%0", "%0", ", ", "%0", "%0\n"],
table : ["|!%0|\n", "|%0|\n", "", "|%group|\n", "|%0|\n"]
},
dateFormat : "DD MMM YYYY"
}
if (typeof gCurrentTiddler == 'undefined')
var gCurrentTiddler;
config.macros.tiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
// Some globals
var count=0, groupCount=0, theGroup="", lastGroup="", firstInGroup = false;
var currentTiddler = tiddler;
gCurrentTiddler = tiddler;
var listWikiText="";
var formats = this.formats;
// SQL-Like parameters
var parameters = paramString.parseParams("name",null,true);
var pTags = parameters[0]["tags"]?parameters[0]["tags"][0].split(","):[];
var pOrder = parameters[0]["order"]?parameters[0]["order"][0]:"title";
var pTop = parameters[0]["top"]?parameters[0]["top"][0]:-1;
var pText = parameters[0]["text"]?parameters[0]["text"][0]:"";
var pTitle = parameters[0]["title"]?parameters[0]["title"][0]:"";
var pSearch = parameters[0]["search"]?parameters[0]["search"][0]:"";
var pFilter = parameters[0]["filter"]?parameters[0]["filter"][0]:"";
var pHeader = parameters[0]["header"]?paramFormat(parameters[0]["header"][0]):"";
var pFooter = parameters[0]["footer"]?paramFormat(parameters[0]["footer"][0]):"";
var pGroup = parameters[0]["group"]?parameters[0]["group"][0]:"";
var pDateFormat = parameters[0]["dateFormat"]?parameters[0]["dateFormat"][0]:this.dateFormat;
var pCustomParameter = parameters[0]["customParameter"]?parameters[0]["customParameter"][0]:"";
var pFormat = parameters[0]["format"]?parameters[0]["format"][0]:"list";
pFormat = formats[pFormat]?pFormat:"list"
// Separator
var pSeparator = parameters[0]["separator"]?paramFormat(parameters[0]["separator"][0]):(parameters[0]["seperator"]?paramFormat(parameters[0]["seperator"][0]):this.templates[pFormat][2])
// Template for group
var pGroupTemplate = this.templates[pFormat][3];
if (parameters[0]["groupTemplate"])
pGroupTemplate = paramFormat(parameters[0]["groupTemplate"][0])
pGroupTemplate = pGroupTemplate.replace("$))", ">>")
// Template for group footer
var pGroupFooterTemplate = "";
if (parameters[0]["groupFooterTemplate"])
pGroupFooterTemplate = paramFormat(parameters[0]["groupFooterTemplate"][0])
pGroupFooterTemplate = pGroupFooterTemplate.replace("$))", ">>")
// Template for item
var pItemTemplate = this.templates[pFormat][1];
if (parameters[0]["itemTemplate"])
pItemTemplate = paramFormat(parameters[0]["itemTemplate"][0])
pItemTemplate = pItemTemplate.replace("$))", ">>").replace("%link", "%0").replace("%item", "%1").replace("%abstract", "%2").replace("%text", "%3").replace("%created", "%4").replace("%modified", "%5").replace("%modifier", "%6").replace("%group", "%7").replace("%title", "%8").replace("%tags", "%9").replace("%nolink", "%10").replace("%custom", "%11")
// Template for footer
var pFooterTemplate = this.templates[pFormat][4].replace("%count", "%1")
// Get all tiddlers
var tiddlers = store.reverseLookup("tags","excludeLists",false);
// Sorting
if(!pOrder)
pOrder = "title";
if (pOrder.match(/^\-/i)) {
pOrder = pOrder.substr(1)
var sortDesc = true;
}
// Sorting on a standard field
if (pOrder.match(/(title)|(text)|(modifier)|(modified)|(created)|(tags)/))
if (sortDesc)
tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] > b[pOrder]) ? -1 : +1; });
else
tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] < b[pOrder]) ? -1 : +1; });
else
if (sortDesc)
tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] > b.fields[pOrder]) ? -1 : +1; });
else
tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] < b.fields[pOrder]) ? -1 : +1; });
// Header
if (pHeader)
listWikiText += formatItem(this.templates[pFormat][0], [pHeader], pFormat)
for(var t=0; t<tiddlers.length; t++) {
tiddler = tiddlers[t];
if (pText!="" && tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
if (pTop==-1 || count<pTop) {
if (pText=="" || tiddler.text.match(pText)) {
if (pTitle=="" || tiddler.title.match(pTitle)) {
if (pSearch=="" || (tiddler.title.match(pSearch) || tiddler.text.match(pSearch))) {
if (pFilter=="" || eval(pFilter)) {
if (pTags.length==0 || compareArrays(tiddler.tags, pTags, "all")) {
count++;
if (tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
// Grouping
if (pGroup) {
theGroup = eval(pGroup);
if(theGroup != lastGroup) {
groupCount++;firstInGroup = true;
if (pGroupFooterTemplate && groupCount>1)
listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
listWikiText += pGroupTemplate.replace("%group", theGroup)
lastGroup = theGroup;
} else
firstInGroup = false;
}
// Separators
if (count>1 && !firstInGroup) listWikiText += pSeparator;
//Plaintext title
var noLink = tiddler.title.match(config.textPrimitives.wikiLink)?"~" + tiddler.title:tiddler.title;
// Custom parameter
if (pCustomParameter)
var custom="";
try {
custom = eval(pCustomParameter)
} catch (e) {}
// List individual tiddler
var strItem = formatItem(pItemTemplate,["[[" + tiddler.title + "]]",count,tiddler.text.substr(0,300),tiddler.text,tiddler.created.formatString(pDateFormat),tiddler.modified.formatString(pDateFormat),tiddler.modifier,theGroup,tiddler.title,tiddler.tags.join(" "),noLink,custom], pFormat)
for (var fld in tiddler.fields) strItem = strItem.replace('%field.' + fld, tiddler.fields[fld]);
listWikiText += strItem
}
}
}
}
}
}
}
// Last group footer
if (pGroup && pGroupFooterTemplate && count>0)
listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
// Footer
if (pFooter) {
pFooter = pFooter.replace("%count", count)
listWikiText += formatItem(pFooterTemplate, [pFooter], pFormat)
}
// Render result
if (!parameters[0]["debug"])
wikify(listWikiText,place, null, currentTiddler)
else
place.innerHTML = "<textarea style=\"width:100%;\" rows=30>" + listWikiText + "</textarea>"
// Local functions
function paramFormat(param) {
// Allow "\n" in non evalled parameters
return param.replace(/\\n/g, "\n");
}
function formatItem(template, values, format) {
// Fill template with values (depending on list format)
if (format.match(/table/) && values[0].match(/\|/))
return ("%0\n").format(values)
else
return template.format(values)
}
function compareArrays(array, values, logic) {
// Compare items in array with AND("all") or OR("any") logic
var matches=0;
for(var v=0; v<values.length; v++)
if(values[v].replace(/^\s+|\s+$/g,"").match(/^\-/) && !array.contains(values[v].replace(/^\s+|\s+$/g,"").substr(1)))
matches++;
else if (array.contains(values[v]))
matches++;
return ((logic=="all" && matches==values.length) || (logic!="all" && matches>0))
}
}
String.prototype.prettyTrim = function(len,prefix,postfix) {
var result = this.trim().replace(/\r\n/g,' ').replace(/\n/g,' ');
if (!prefix) prefix = '';
if (!postfix) postfix = '';
if (result.length > len - 3)
return prefix + result.substr(0,len) + '...' + postfix;
else if (result.length > 0)
return prefix + result + postfix;
else
return result;
}
//}}}
/***
|Name|TiddlerToCPlugin|
|Source|[[FND's DevPad|http://devpad.tiddlyspot.com/#TiddlerToCPlugin]]|
|Version|0.7|
|Author|FND|
|Contributors|[[Saq|http://tw.lewcid.org]]|
|License|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|N/A|
|Overrides|N/A|
|Description|create a table of contents from a tiddler's headings|
!Notes
Doug Compton has written a similar, though much more advanced plugin for this purpose, called [[DcTableOfContentsPlugin|http://devpad.tiddlyspot.com/#DcTableOfContentsPlugin]].
!Usage
Add {{{<<ToC>>}}} to the desired tiddler(s). Alternatively, a parameter can be used to display the table of contents for another tiddler: {{{<<ToC "tiddlerName">>}}}.
The styling can be modified in the [[StyleSheetTableOfContents]] shadow tiddler.
<<ToC>>
!Changelog
!!v0.5a (2007-05-20)
* initial release
!!v0.5b (2007-05-20)
* renamed to TiddlerToCPlugin (to prevent confusion with the existing [[TableOfContentsPlugin|http://tiddlytools.com/#TableOfContentsPlugin]])
!!v0.6 (2007-05-21)
* several bugfixes and significant improvements regarding the macro code (thanks Saq)
!!v0.7 (2007-08-29)
* fixed error for tiddlers not containing any headings
!Issues / To Do
* add links to sections (problematic, as there are no anchors, yet?)
* introduce thresholds (minimum amount of headings to show a ToC, maximum depth)
!Code
***/
//{{{
/*
** Styles (can be customized in the StyleSheetTableOfContents shadow tiddler)
*/
config.shadowTiddlers.StyleSheetTableOfContents = "/*{{{*/\n"
+ ".ToC {\n\tfloat: left; /* auto-width */\n\tmargin: 0 2em 2em 0;\n\tborder: 1px solid #aaa;\n\tpadding: 5px;\n\tbackground-color: #eee;\n}\n\n"
+ ".ToC ol {\n\tmargin: 0 1em;\n}\n\n"
+ "h1 {\n\tclear: left;\n}\n"
+ "/*}}}*/";
store.addNotification("StyleSheetTableOfContents", refreshStyles);
/*
** Macro Code
*/
config.macros.ToC = { label: "Add Table of Contents", prompt: "Add Table of Contents" }; // DEBUG: obsolete?
config.macros.ToC.handler =
function(place, macroName, params, wikifier, paramString, tiddler) {
// process parameters
if (params[0]) { // tiddler name
tiddler = store.getTiddler(params[0]);
}
// create table of contents
generateToC(place, tiddler);
return false; // DEBUG: ?
}
/*
** Main Code
*/
generateToC = function(place, tiddler) {
// retrieve headings
var RegEx = /^!+(.*)$/gim;
var tiddlerContents = tiddler.text.match(RegEx);
// create ToC
if(tiddlerContents) {
var ToC = "";
for(var i = 0; i < tiddlerContents.length; i++) {
ToC += tiddlerContents[i] + "\n";
}
// replace headings markup with list markup
for(var i = 0; i < 6; i++) { // DEBUG: inefficient!? (use a single RegEx instead? problem: JavaScript RegEx limitations)
ToC = ToC.replace(/^(#*)!/gim, "$1#");
}
// add ToC wrapper container
//ToC = "{{ToC{\n''Table of Contents''\n" + ToC + "}}}\n";
ToC = "{{ToC{\n" + ToC + "}}}\n";
// add ToC to tiddler
wikify(ToC, place);
}
return false;
}
//}}}
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed.
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab = config.options.chkHideTabsBarWhenSingleTab ? config.options.chkHideTabsBarWhenSingleTab : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "closeOthers";
config.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
config.macros.tiddlersBar = {
tooltip : "see ",
tooltipClose : "click here to close this tab",
tooltipSave : "click here to save this tab",
promptRename : "Enter tiddler new name",
currentTiddler : "",
previousState : false,
previousKey : config.options.txtPreviousTabKey,
nextKey : config.options.txtNextTabKey,
tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
handler: function(place,macroName,params) {
var previous = null;
if (config.macros.tiddlersBar.isShown())
story.forEachTiddler(function(title,e){
if (title==config.macros.tiddlersBar.currentTiddler){
var d = createTiddlyElement(null,"span",null,"tab tabSelected");
config.macros.tiddlersBar.createActiveTabButton(d,title);
if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
previous = "active";
}
else {
var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
btn.setAttribute("tiddler", title);
if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
previous=btn;
}
var isDirty =story.isDirty(title);
var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
c.setAttribute("tiddler", title);
if (place.childNodes) {
place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
place.insertBefore(d,place.firstChild);
}
else place.appendChild(d);
})
},
refresh: function(place,params){
removeChildren(place);
config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
story.refreshAllTiddlers();
if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
}
},
isShown : function(){
if (config.options.chkDisableTabsBar) return false;
if (!config.options.chkHideTabsBarWhenSingleTab) return true;
var cpt=0;
story.forEachTiddler(function(){cpt++});
return (cpt>1);
},
selectNextTab : function(){ //used when the current tab is closed (to select another tab)
var previous="";
story.forEachTiddler(function(title){
if (!config.macros.tiddlersBar.currentTiddler) {
story.displayTiddler(null,title);
return;
}
if (title==config.macros.tiddlersBar.currentTiddler) {
if (previous) {
story.displayTiddler(null,previous);
return;
}
else config.macros.tiddlersBar.currentTiddler=""; // so next tab will be selected
}
else previous=title;
});
},
onSelectTab : function(e){
var t = this.getAttribute("tiddler");
if (t) story.displayTiddler(null,t);
return false;
},
onTabClose : function(e){
var t = this.getAttribute("tiddler");
if (t) {
if(story.hasChanges(t) && !readOnly) {
if(!confirm(config.commands.cancelTiddler.warning.format([t])))
return false;
}
story.closeTiddler(t);
}
return false;
},
onTabSave : function(e) {
var t = this.getAttribute("tiddler");
if (!e) e=window.event;
if (t) config.commands.saveTiddler.handler(e,null,t);
return false;
},
onSelectedTabButtonClick : function(event,src,title) {
var t = this.getAttribute("tiddler");
if (!event) event=window.event;
if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
return false;
},
onTiddlersBarAction: function(event) {
var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
},
createActiveTabButton : function(place,title) {
if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
btn.setAttribute("tiddler", title);
}
else
createTiddlyText(place,title);
}
}
story.coreCloseTiddler = story.coreCloseTiddler? story.coreCloseTiddler : story.closeTiddler;
story.coreDisplayTiddler = story.coreDisplayTiddler ? story.coreDisplayTiddler : story.displayTiddler;
story.closeTiddler = function(title,animate,unused) {
if (title==config.macros.tiddlersBar.currentTiddler)
config.macros.tiddlersBar.selectNextTab();
story.coreCloseTiddler(title,false,unused); //disable animation to get it closed before calling tiddlersBar.refresh
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
story.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle){
story.coreDisplayTiddler(config.macros.tiddlersBar.tabsAnimationSource,tiddler,template,animate,unused,customFields,toggle);
var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;
if (config.macros.tiddlersBar.isShown()) {
story.forEachTiddler(function(t,e){
if (t!=title) e.style.display="none";
else e.style.display="";
})
config.macros.tiddlersBar.currentTiddler=title;
}
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
var coreRefreshPageTemplate = coreRefreshPageTemplate ? coreRefreshPageTemplate : refreshPageTemplate;
refreshPageTemplate = function(title) {
coreRefreshPageTemplate(title);
if (config.macros.tiddlersBar) config.macros.tiddlersBar.refresh(document.getElementById("tiddlersBar"));
}
ensureVisible=function (e) {return 0} //disable bottom scrolling (not useful now)
config.shadowTiddlers.StyleSheetTiddlersBar = "/*{{{*/\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .button {border:0}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .tab {white-space:nowrap}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar {padding : 1em 0.5em 2px 0.5em}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tabUnselected .tabButton, .tabSelected .tabButton {padding : 0 2px 0 2px; margin: 0 0 0 4px;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tiddler, .tabContents {border:1px [[ColorPalette::TertiaryPale]] solid;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar +="/*}}}*/";
store.addNotification("StyleSheetTiddlersBar", refreshStyles);
config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");
//}}}
/%
!info
|Name|ToggleRightSidebar|
|Source|http://www.TiddlyTools.com/#ToggleRightSidebar|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|show/hide right sidebar (SideBarOptions)|
Usage
<<<
{{{
<<tiddler ToggleRightSidebar>>
<<tiddler ToggleRightSidebar with: label tooltip>>
}}}
Try it: <<tiddler ToggleRightSidebar##show
with: {{config.options.chkShowRightSidebar?'►':'◄'}}>>
<<<
Configuration:
<<<
{{{
config.options.chkShowRightSidebar (true)
config.options.txtToggleRightSideBarLabelShow (◄)
config.options.txtToggleRightSideBarLabelHide (►)
}}}
<<<
!end
!show
<<tiddler {{
var co=config.options;
if (co.chkShowRightSidebar===undefined) co.chkShowRightSidebar=true;
var sb=document.getElementById('sidebar');
var da=document.getElementById('displayArea');
if (sb) {
sb.style.display=co.chkShowRightSidebar?'block':'none';
da.style.marginRight=co.chkShowRightSidebar?'':'1em';
}
'';}}>><html><nowiki><a href='javascript:;' title="$2"
onmouseover="
this.href='javascript:void(eval(decodeURIComponent(%22(function(){try{('
+encodeURIComponent(encodeURIComponent(this.onclick))
+')()}catch(e){alert(e.description?e.description:e.toString())}})()%22)))';"
onclick="
var co=config.options;
var opt='chkShowRightSidebar';
var show=co[opt]=!co[opt];
var sb=document.getElementById('sidebar');
var da=document.getElementById('displayArea');
if (sb) {
sb.style.display=show?'block':'none';
da.style.marginRight=show?'':'1em';
}
saveOptionCookie(opt);
var labelShow=co.txtToggleRightSideBarLabelShow||'◄';
var labelHide=co.txtToggleRightSideBarLabelHide||'►';
if (this.innerHTML==labelShow||this.innerHTML==labelHide)
this.innerHTML=show?labelHide:labelShow;
this.title=(show?'hide':'show')+' right sidebar';
var sm=document.getElementById('storyMenu');
if (sm) config.refreshers.content(sm);
return false;
">$1</a></html>
!end
%/<<tiddler {{
var src='ToggleRightSidebar';
src+(tiddler&&tiddler.title==src?'##info':'##show');
}} with: {{
var co=config.options;
var labelShow=co.txtToggleRightSideBarLabelShow||'◄';
var labelHide=co.txtToggleRightSideBarLabelHide||'►';
'$1'!='$'+'1'?'$1':(co.chkShowRightSidebar?labelHide:labelShow);
}} {{
var tip=(config.options.chkShowRightSidebar?'hide':'show')+' right sidebar';
'$2'!='$'+'2'?'$2':tip;
}}>>
<<tiddlerList tags:"scenario">>
<html><h1>What's SpeedFan?</h1> <p>"SpeedFan is a program that monitors voltages, fan speeds and temperatures in computers with hardware monitor chips. SpeedFan can even access S.M.A.R.T. info and show hard disk temperatures. SpeedFan supports SCSI disks too." <a href="http://www.almico.com/speedfan.php">http://www.almico.com/speedfan.php</a></p> <h1>What to use it for?</h1> <p>You might want to show an alert if, let's say the CPU temperature is above a certain threshold and use all the features FP-QUI offers (use text-to-speech, play and repeat a sound, etc.).</p> <h1>How?</h1> <ol> <li>Download and install SpeedFan</li> <li>Start the application</li> <li>Wait for this window to appear</li> </ol> <p style="margin-left: 40px;"><img width="449" height="518" style="" src="images/speedfanMainWindow.png" alt="SpeedFan main window" /></p> <ol start="4"> <li>Click on "Configure"</li> <li>In the now opening window, switch to the "Events"-tab</li> </ol> <p style="margin-left: 40px;"><img src="images/speedfanConfigureWindow.png" alt="SpeedFan configuration window" style="width: 798px; height: 349px;" /></p> <ol start="6"><li>Here you can "Add" an event: <ol type="a"><li>Specify a condition. For instance: GPU (temp) from GeForce Video card > 60</li><li><strong><span style="color: rgb(153, 51, 0);">Important:</span></strong> <span style="background-color: Yellow;">set "Allow every" to about 60 or higher!</span> This avoids an overload.</li><li>Select "execute" and provide the path to FP-QUI.exe in the next text field (for instance: C:\Program Files\FP-QUI\FP-QUI.exe).</li><li>In the last text field, enter some arguments that specify how the QUI looks like and what it does.<ol type="a"><li>You may use FP-QUICodeGenerator to generate valid code which you can simply copy and paste.</li><li>example: <code><text>CPU temperature critical</text><bkColor>red</bkColor><trans>255</trans><talk><string>%text%</string><pause>10000</pause></talk><focus>1</focus><noDouble>1</noDouble></code></li><li>Keep in mind that setting <span style="background-color: Yellow;"><noDouble> </span>to 1 avoids QUIs with the same signature (that are basically the same) of showing up. In other words, if, for instance, the CPU temp doesn't normalize for some time, this will avoid having copies of an already existing QUI that tells you the CPU temperature is not OK.</li></ol></li></ol></li><li>Once you're done adding some events, don't forget to click OK.</li></ol> <h1>Keep in mind</h1> <ol> <li>SpeedFan has to be running in the background for this to work.</li> <li>FP-QUICore.exe does not need to be running in the background, it will be started automatically when FP-QUI.exe is executed. However, once it's been started, it will not terminate by itself. (This might be implemented one day.)</li> </ol></html>
<html><h1>What to use it for?</h1> <p>FP-QUI can be used to show popups/notifications when new mails arrive.</p> <p>If you use the <a href="https://addons.mozilla.org/de/thunderbird/addon/10052/" target="_blank">FiltaQuilla Addon</a> by <a target="_blank" href="https://addons.mozilla.org/de/thunderbird/user/3346687">rkentjames</a> you can use message filters to specify under which conditions a notification shall be shown. Of course, you may customize the notifications and specify text, icon, background color etc. ([[see here for more details|Generating FP-QUI-Code]]).</p> <h4>Examples: things you can do:</h4> <ul> <li>Show a notification when a new mail from a specific sender is received and display the subject.</li> <li>Show a notification and repeatedly play a sound when a new mail is received in a specific account.</li> <li>Open up thunderbird when you click on a notification.</li> <li>Automatically open up thunderbird when a new mail is received in the specified account.</li> </ul> <h1>How?</h1> <p><cite>Note: This assumes you will use the <a href="https://addons.mozilla.org/de/thunderbird/addon/10052/" target="_blank">FiltaQuilla Addon</a>. You can, however, use any addon that can execute a command once new mails have been received (for instance: <a href="https://addons.mozilla.org/de/thunderbird/addon/2610/" target="_blank">Mailbox Alert</a>).</cite></p> <ol> <li>Install the <a target="_blank" href="https://addons.mozilla.org/de/thunderbird/addon/10052/">FiltaQuilla Addon</a>.</li> <li>Open up the FiltaQuilla preferences window. <p><img style="width: 504px; height: 206px;" src="images/filtaQuillaConfig.png" alt="FiltaQuilla config window" /></p></li> </ol> <ol start="3"> <li>Enable "Run File" and press OK.</li> <li>Restart thunderbird.</li> <li>You can now setup message filters that trigger the execution of a command, which in turn generates a QUI-notification/popup. (click on Tools/Message Filters)<img vspace="5" hspace="5" align="right" src="images/thunderbirdFilterRulesWindow.png" alt="thunderbirdFilterRulesWindow" style="width: 431px; height: 333px;" /><br /> <ol type="a"> <li>In the "Perform these actions"-area add a "Run File" action.</li> <li>Select the path to FP-QUI.exe by clicking on the folder-icon, or set the path manually (in some cases, FP-QUI is located in C:\Program Files\FP-QUI\FP-QUI.exe).</li> <li>Per default, FiltaQuilla adds <code>",@SUBJECT@,@MESSAGEID@"</code> after the path to FP-QUI.exe. Obviously you can use these variables within the <text>-tags and thereby show the subjects of new mails.</li> <li>Replace <code>"@SUBJECT@,@MESSAGEID@"</code> by a custom FP-QUI-Code. You may use FP-QUICodeGenerator for this.</li> <li><span style="background-color: Yellow;">Important: Keep the semicolon (",") right after FP-QUI.exe.</span></li> <li>Example: <br /><small><code>C:\Program Files\FP-QUI\FP-QUI.exe,<text>new mail</text><audio><path>@MyDocumentsDir\Audio\message_starTrek205.wav</path><repeat>1</repeat><shake>1</shake></audio><untilClick><any>1</any></untilClick><onClick><prim>C:\Program Files\Thunderbird\ThunderbirdPortable.exe</prim></onClick><noDouble>1</noDouble></code></small></li> </ol></li> </ol> <ol type="a" start="b"> <p><br /> <span style="display: none;" id="1280285006738S"> </span></p> </ol></html>
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler editHtml > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<!-- <div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div> --!>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<html><p>[[Internal]]</p></html>