Source:
! Findings
! Abstract
On the right side of my TW there are default buttons like "+" which adds a new tiddler. How do I add another ADD button which has predefined content and tags? I'm adding one study per new tiddler and I'd like each study tiddler to have a tag of "study" but also have this content as a template:
Source:
! Findings
! AbstractI'm new to this type of changes to TW so if you could explain each steps, where each data goes, and speak slowly, I think I will get it. :)
<$button class="tc-btn-invisible"
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/spiral}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text="New Study"/></span>
</$list>
<$action-sendmessage $message="tm-new-tiddler" tags="study" text={{MyButtonTemplate}}/>
</$button>
{{$:/core/images/spiral}} New Study
Use this button to create a new Study tiddler with default content
Source:
! Findings
! Abstract
"Palette", "Story View", "Theme", "Toolbars" and "Theme Tweaks".
"Edit Toolbar", "Editor Toolbar", "Page Toolbar" and "View Toolbar".
Thanks Eric. Now I can see how all the parts link together and understand how it all works.I did get the new spiral button on the page control bar but it also has a "</$list>" on the page control bar. My first thought is a mismatched or extra "</$list>" but I don't see one. Any ideas what is going on? I simply copied and pasted your code from this group into the tiddler.
<$button class="tc-btn-invisible"
<$button class="tc-btn-invisible">
@@fill:orange; {{$:/core/images/spiral}}@@
You don't need to make a new button image. "Spiral" is an SVG image. For *most* SVG images, you can change the color using the "@@fill:... @@" inline CSS syntax, like this:
@@fill:orange; {{$:/core/images/spiral}}@@
@@fill:orange; {{$:/core/images/new-button}}@@
<$button class="studybutton">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
@@fill:orange; {{$:/core/images/new-button}}@@
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text="New Study"/></span>
</$list>
<$action-sendmessage $message="tm-new-tiddler" tags="study" text={{AddStudyTemplate}}/>
</$button>
.studybutton { color:orange; }
<$button class="tc-btn-invisible">
<$button class=<<tv-config-toolbar-class>> >
On Thursday, December 19, 2019 at 3:17:36 AM UTC-8, Chuck R. wrote:On the right side of my TW there are default buttons like "+" which adds a new tiddler. How do I add another ADD button which has predefined content and tags? I'm adding one study per new tiddler and I'd like each study tiddler to have a tag of "study" but also have this content as a template:
Source:
! Findings
! AbstractI'm new to this type of changes to TW so if you could explain each steps, where each data goes, and speak slowly, I think I will get it. :)The right hand panel is called "the Sidebar". The "Page Controls" buttons that appear at the top of the sidebar (e.g., "new tiddler", "control panel", "save changes", etc.) are not stored in a single tiddler. Rather, each button definition has it's own tiddler, and these tiddlers are all tagged with "$:/tags/PageControls" to indicate that they should appear in that part of the Sidebar.To define your own button, create a new tiddler (e.g., "MyButton")1) First, add the $:/tags/PageControls tags to that tiddler.2) Next, enter your button definition into the text area, like this:
<$button class=<<tv-config-toolbar-class>> >
<$button class=<<tv-config-toolbar-class>> tooltip="Add new study tiddler">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
@@fill:orange;
{{$:/core/images/new-button}}
@@
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text="New Study"/></span>
</$list>
<$action-sendmessage $message="tm-new-tiddler" tags="study" text={{AddStudyTemplate}}/>
</$button>
html body.tc-body .chunk .tc-image-new-button {stroke: white;fill:orange;}
<$button class=<<tv-config-toolbar-class>> tooltip="Add new study tiddler"> <$list filter="[<tv-config-toolbar-icons>match[yes]]">
<span class="chunk">{{$:/core/images/new-button}}</span>
</$list> <$list filter="[<tv-config-toolbar-text>match[yes]]"> <span class="tc-btn-text"><$text text="New Study"/></span> </$list> <$action-sendmessage $message="tm-new-tiddler" tags="study" text={{AddStudyTemplate}}/></$button>
Hi Chunk your answer is here
- Create a tiddler tagged with $:/tags/Stylesheet
- put in the text body
html body.tc-body .chunk .tc-image-new-button {stroke: white;fill:orange;}
html body.tc-body .chunk .tc-image-new-button:hover {stroke: white;fill:#000;}
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/226ff2c6-829a-4509-92da-eb012b8262a7%40googlegroups.com.
I get the sense that the height of my new button is limited so it displays as a gray dash. I wonder if this is a CSS issue.