1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Text-slicer updates

This commit is contained in:
Jermolene 2015-10-08 18:04:24 +01:00
parent 7e9f7afa94
commit 5faba15446
8 changed files with 27 additions and 11 deletions

View File

@ -45,10 +45,14 @@ The following theme tweaks should be applied to enable the preview column:
Documents can be saved under Node.js, or previewed in the browser. Documents can be saved under Node.js, or previewed in the browser.
!! Browser !! Exporting Documents in the Browser
To preview a document, locate it in the preview column and click the button labelled "View document". The document will open in plain text in a new window. The window will be automatically updated as you work on the document. To preview a document, locate it in the preview column and click the button labelled "View document". The document will open in plain text in a new window. The window will be automatically updated as you work on the document.
!! Exporting Documents under Node.js
[TBD]
! Sliced Document Format ! Sliced Document Format
!! Introduction !! Introduction
@ -100,7 +104,6 @@ The document itself is represented by a tiddler with the following fields:
* ''text'': Available for comments about the document * ''text'': Available for comments about the document
* ''list'': ordered list of tiddlers making up the root level of this document * ''list'': ordered list of tiddlers making up the root level of this document
!!! Headings !!! Headings
Tiddlers representing headings have the following fields: Tiddlers representing headings have the following fields:
@ -140,3 +143,17 @@ The tiddlers representing items within the list have the following fields:
* ''title'': an automatically generated unique title * ''title'': an automatically generated unique title
* ''text'': the text of the list item * ''text'': the text of the list item
* ''tags'': any CSS classes found in the HTML are converted into tags * ''tags'': any CSS classes found in the HTML are converted into tags
!!! Images
Tiddlers representing images have the following fields:
* ''toc-type'': the text "image"
* ''title'': an automatically generated unique title
* ''type'': appropriate content type for the image (eg "image/jpeg")
! Document Metadata, Tags and Classes
[TBD]

View File

@ -1,11 +1,7 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/document title: $:/plugins/tiddlywiki/text-slicer/templates/static/document
`<div class="tc-output-document">`
<$set name="tv-exclude-filter" value={{!!toc-exclude-filter}}> <$set name="tv-exclude-filter" value={{!!toc-exclude-filter}}>
<$list filter="[list<currentTiddler>!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/> <$list filter="[list<currentTiddler>!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/>
</$set> </$set>
`</div>`

View File

@ -1,6 +1,6 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/heading title: $:/plugins/tiddlywiki/text-slicer/templates/static/heading
`<`<$text text={{!!toc-heading-level}}/>`>` `<`<$text text={{!!toc-heading-level}}/>` class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
<$view field="text" format="htmlencodedplainwikified"/> <$view field="text" format="htmlencodedplainwikified"/>

View File

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes
<$list filter="[all[current]tags[]addprefix[$:/_DocumentTags/]has[title]]"><$view field="css-class"/> </$list>

View File

@ -1,3 +1,3 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/image title: $:/plugins/tiddlywiki/text-slicer/templates/static/image
`<img src="data:`<$view format="text" field="type"/>`;base64,`<$view format="text" field="text"/>`">` `<img src="data:`<$view format="text" field="type"/>`;base64,`<$view format="text" field="text"/>`" class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`

View File

@ -1,6 +1,6 @@
title: $:/plugins/tiddlywiki/text-slicer/templates/static/item title: $:/plugins/tiddlywiki/text-slicer/templates/static/item
`<li>` `<li class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
<$transclude/> <$transclude/>

View File

@ -2,7 +2,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/list
<$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item"> <$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item">
`<`<$text text={{!!toc-list-type}}/>`>` `<`<$text text={{!!toc-list-type}}/>` class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
<$list filter={{!!toc-list-filter}} template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/> <$list filter={{!!toc-list-filter}} template="$:/plugins/tiddlywiki/text-slicer/templates/static/tiddler"/>

View File

@ -2,7 +2,7 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/paragraph
<$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item"> <$list filter="""[all[current]] $(tv-exclude-filter)$ +[limit[1]]""" variable="item">
`<p>` `<p class="`{{||$:/plugins/tiddlywiki/text-slicer/templates/static/helpers/classes}}`">`
<$view field="text" format="htmlencodedplainwikified"/> <$view field="text" format="htmlencodedplainwikified"/>