Thank you Albert!
This works really great!
And your suggestion to use a field is even better. I just did not dare to ask for this. The hidden slice in the textfield is a little disturbing for Users not used to the syntax. I think it would be helpful for a lot of people, if you could publish what you described as a ToolTipTweakPlugin.

Again thanks a lot
Jan

Am 18.05.2014 12:12, schrieb Albert Riedinger:
Hi Jan,

the following snippet should do what you are after:

|
//{{{
Tiddler.prototype.TWCore_getSubtitle=Tiddler.prototype.getSubtitle;
Tiddler.prototype.getSubtitle =function(){
vardesc =store.getTiddlerSlice(this.title,"tooltip");
if(!!desc){
returndesc;
}else{
vartags =store.getTiddler(this.title).getTags();
vartagList =tags.readBracketedList().join(", ");
return"Tags: "+tagList;
}
};
//}}}
|


One suggestion: Maybe it would be better not to define tooltips with hidden slices but with a custom field which could be edited in edit mode (EditTemplate)? If you like, I could rewrite this snippet to support both options > slice and custom field (both named tooltip)?

Have fun,

Albert



Am Samstag, 17. Mai 2014 21:44:15 UTC+2 schrieb Jan:

    Hello all!
    I found a part of the solution for my tooltip-problem:
    Searching through the Archive of this group I found a solution for
    the problem of changing the tooltip by a defined slice stored in
    each Tiddler posted by Eric some time ago:

    1) Put the following javascript code into a tiddler, tagged with
    systemConfig, then save-and-reload your document
    |
    //{{{
    Tiddler.prototype.TWCore_getSubtitle=Tiddler.prototype.getSubtitle;
    Tiddler.prototype.getSubtitle =function(){
    
returnstore.getTiddlerSlice(this.title,'tooltip')||this.TWCore_getSubtitle();
    };
    //}}}
    |

    2) To override the default tooltip for a given tiddler, add a
    "tooltip:" slice entry into that tiddler's text, like this:
    |
    /%
    tooltip: this is the custom text
    %/
    |

    Note the use of /% and %/ comment markers surrounding the slice
    definition.   This prevents the embedded slice definition from
    being displayed in the tiddler output.

    *My question now **is:**
    **How can I modify this Code to show the Tags, if there is no
    tooltip-slice yet?*




    Thanks a lot for help
    Jan

--
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+unsubscr...@googlegroups.com <mailto:tiddlywiki+unsubscr...@googlegroups.com>. To post to this group, send email to tiddlywiki@googlegroups.com <mailto:tiddlywiki@googlegroups.com>.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to