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:
Jermolene
2017-12-14 14:16:54 +00:00
parent f128650c6e
commit e344c38349
39 changed files with 2943 additions and 713 deletions

View File

@@ -8,12 +8,12 @@ $(tv-heading-status-config-title)$/$(tv-heading-status-config-prefix)$/$(current
<$set name="tv-heading-status-config-title" value=<<config-heading-status>>>
<div class="tc-document-tiddler">
<div class="tc-document-tiddler-toolbar">
<$reveal type="nomatch" state=<<tv-heading-status-config-title>> text="close" default=<<tv-default-heading-state>>>
<$reveal type="nomatch" state=<<tv-heading-status-config-title>> text="close" default=<<tv-default-heading-state>> tag="div">
<$button set=<<tv-heading-status-config-title>> setTo="close" class="tc-btn-invisible">
{{$:/core/images/down-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<tv-heading-status-config-title>> text="close" default=<<tv-default-heading-state>>>
<$reveal type="match" state=<<tv-heading-status-config-title>> text="close" default=<<tv-default-heading-state>> tag="div">
<$button set=<<tv-heading-status-config-title>> setTo="open" class="tc-btn-invisible">
{{$:/core/images/right-arrow}}
</$button>
@@ -22,7 +22,7 @@ $(tv-heading-status-config-title)$/$(tv-heading-status-config-prefix)$/$(current
<$link tag="$level$" class="tc-document-tiddler-link">
<$transclude/>
</$link>
<$reveal type="nomatch" state=<<tv-heading-status-config-title>> text="close" default=<<tv-default-heading-state>>>
<$reveal type="nomatch" state=<<tv-heading-status-config-title>> text="close" default=<<tv-default-heading-state>> tag="div">
<$list filter="[list<currentTiddler>!has[draft.of]]" template="$:/plugins/tiddlywiki/text-slicer/templates/interactive/tiddler"/>
</$reveal>
</div>