mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-02 05:56:58 +00:00
Major updates to text-slicer plugin
* In the interests of performance and expressiveness, switched to using a Sax parser instead of a DOM implementation. * Use extensible declarative rules to control the slicing process * Added new optional set of rules for slicing by heading, where the paragraphs underneath a heading are packed into the same tiddler as the heading * Added a modal dialogue for specifying parameters when slicing in the browser
This commit is contained in:
@@ -1,45 +1,28 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/templates/interactive/tiddler
|
||||
|
||||
\define if(condition,then,else)
|
||||
<$list filter="""$condition$ +[limit[1]]""" emptyMessage="""$else$""" variable="ignore">
|
||||
$then$
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define include-component(type)
|
||||
<<if "[{!!toc-type}prefix[$type$]]" """
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/$type$" mode="block"/>
|
||||
""">>
|
||||
\end
|
||||
|
||||
<$list filter="[<tv-show-toolbar>prefix[yes]]" variable="hasToolbar">
|
||||
{{||$:/plugins/tiddlywiki/text-slicer/ui/tiddler/toolbar}}
|
||||
</$list>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="document">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/document" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="heading">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/heading" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="paragraph">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/paragraph" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="note">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/note" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="list">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/list" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="item">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/item" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="image">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/image" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="def-list">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/def-list" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="term">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/term" mode="block"/>
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="match" state="!!toc-type" text="definition">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/definition" mode="block"/>
|
||||
</$reveal>
|
||||
<<include-component "document">>
|
||||
<<include-component "heading">>
|
||||
<<include-component "paragraph">>
|
||||
<<include-component "note">>
|
||||
<<include-component "list">>
|
||||
<<include-component "item">>
|
||||
<<include-component "image">>
|
||||
<<include-component "def-list">>
|
||||
<<include-component "term">>
|
||||
<<include-component "definition">>
|
||||
|
||||
Reference in New Issue
Block a user