Hello everyone,
I'm attempting to roll my own excision macro so that the resulting tiddler structure works something like an outliner.
It occurs to me that I might be re-inventing the napkin. Has anyone else already made an outliner for TW5?
Is there a way to change the default macro in the excision dialog so I don't have to keep typing in the new macro name over and over?
I'll post the macro and stylesheet I have so far below.
Thanks!
Mark
Styles:
.transedit .tc-image-fold, .transedit .tc-image-unfold, .transedit .tc-image-edit-button {
width: 1em ;
height: auto ;
line-height: 1.2em ;
float:right;
}
.transedit .tc-btn-invisible, .transedit .tc-subtitle {
float: right;
line-height: 1.2em ;
}
.transedit svg {
fill: blue;
}
Styles:
\define transedit("title")
<$reveal text="show" type="match" state="""$:/state/$title$""">
<br/>
@@.transedit
<$button set= """$:/state/$title$""" setTo="hide" class="tc-btn-invisible">{{$:/core/images/fold-button}}</$button>
<$button message="tm-edit-tiddler" param="""$title$""" class="tc-btn-invisible" >{{$:/core/images/edit-button}}</$button>
@@
<$transclude tiddler="""$title$""" mode="block"/>
</$reveal>
<$reveal text="show" type="nomatch" state="""$:/state/$title$""">
<br/>
@@.transedit
<$button set="""$:/state/$title$""" setTo="show" class="tc-btn-invisible" >
{{$:/core/images/unfold-button}}</$button><span class="tc-subtitle"> $title$ </span>
@@
</$reveal>
\end