Note: An alternative skin, TW4MW (work in progress), is available from the user preferences.
Multi-Line Contents
TiddlyWiki Community Wiki
Some instances of wiki markup (e.g. lists or tables) do not allow multi-line contents.
However, there are several workarounds for this.
Contents |
[edit] CSS Class Wrappers
By using a wrapper for custom CSS classes, multi-line content can be inserted directly into the respective element:
# item 1
# {{multiLine{
item 2, first line
item 2, second line
item 2, third line
}}}
# item 3
Note that the respective class (here multiLine) does not necessarily have to be defined in the StyleSheet; this works even without custom styling.
This is the cleanest and most versatile method of circumventing these limitations. However, this technique cannot be applied within tables.
[edit] Manual Line Breaks
A manual line break can be inserted by using <br>:
|* List item 1<br>* List item 2<br>* list item 3<br><br>* List item with double spacing|
Using one of TiddlyTools' core tweaks, two backslashes can be inserted to allow for actual line breaks without jeopardizing the formatting:
|foo|bar\\ baz|
This core tweak can be installed by creating a new tiddler, tagging it with "systemConfig", and adding the following code:
//{{{
window.coreWikify = wikify;
window.wikify = function(source,output,highlightRegExp,tiddler) {
if (source) arguments[0]=source.replace(/\\\\\n/mg,"<br>");
coreWikify.apply(this,arguments);
}
//}}}
[edit] Separate Tiddlers
By using the Tiddler macro, multi-line content from a separate tiddler can be retrieved and inserted into the respective element:
# item 1 # <<tiddler [[item 2]]>> # item 3
[edit] Within Table Cells
The MediaWikiTableFormatterPlugin provides an alternative table syntax which supports multi-line contents within table cells.
[edit] Partial Transclusion
By hiding sections in a tiddler, transclusion can be used to insert multi-line contents:
|Foo|<<tiddler [[SampleTiddler##Lorem]]>>| |Bar|<<tiddler [[SampleTiddler##Ipsum]]>>| /% !Lorem Lorem ipsum dolor sit amet. !Ipsum Consectetur adipisicing elit. !end %/ Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

