There was some discussion in this group previously around this issue
(in the thread "Help: turning plugin macro into toolbar item,
MailTiddler" which indicated some success, but I have not been able to
turn this into a workable plugin or macro.
We run a phone-in helpline and I have set up a guerilla TW for my team
to help in responding to questions. At this time it not possible to
put this info on the web, so I want to be able to click an "email"
button, see the tiddler appear in my default mail client, fill in the
email address and send.
I am very new to TW and really have no idea what I'm doing with CSS.
Any help would be appreciated.
This has limitations but might work for you. It should work with any
email client on you computer but don't know about webmail. mailto: has
a limitation of 200 characters (I think) in the body.
1. Create tiddler called EmailTiddler with this content and tag it
systemConfig:
//{{{
config.macros.email = {};
config.macros.email.handler =
function(place,macroName,params,wikifier,paramString,tiddler){
wikify('[[email|mailto:?subject='+escape(tiddler.title)
+'&body='+escape(tiddler.text)+']]',place);
place.lastChild.className='button';
place.lastChild.title='Email this
tiddler';
}
//}}}
2. Modify this line in your ViewTemplate tiddler to include the <span
macro='email'></span> portion:
<div class='toolbar'>
<span macro='toolbar newHere +editTiddler deleteTiddler permalink
references jump closeOthers -closeTiddler'><span macro='email'></
span></div>
3. Save and reload.
Rick
you will find this macro:
//{{{
config.macros._mail = {};
config.macros._mail.handler = function
(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<html><a href=\"mailto:?subject=" + tiddler.title +
"&body=" + tiddler.text.htmlEncode() + "\">mail</a></html>", place);
}
//}}}
put <<_mail>> in the body of the tiddler & it will create a mail
(unfortunately, with the carriage returns stripped out)
..c..
I had the same problem but found the solution. When copying the code
from Rick and creating that systemConfig tiddler there are some html-
linebreaks about which TiddlyWiki complains (so it's actually a copy/
paste problem). Simply go to that tidller and remove all blank lines
with the del-key and than insert them again with the return-key. After
that save and reload and it should work (well it did on my
TiddlyWiki).
/HeX
when copying the
On Jun 16, 9:25 pm, "Damian & Steph Bariexca" <barie...@gmail.com>
wrote:
> Rick,
>
> Thanks for this code - I'm trying to implement it on my site, but I keep
> getting a plugin manager error message: "SyntaxError: missing : after
> property id". I know nothing about programming, and my attempts at Googling
> a solution have left me more confused than when I started - any suggestions?
>
> Thanks again,
> Damian
>
is there a way to get the encoding for German umlauts like öäüß
correctly rendered by "tiddler.text.htmlEncode()" ? Also when I've got
a heading which starts with the dewikifier "~" the macro goes
silly...i.e.:
"!~TestHeading" gets rendered as "!???????????????????"
Thanks,
/HeX
On Jun 16, 11:15 pm, dotCdot <ilin...@gmail.com> wrote:
> at this thread (c/o Brian Burnham):
>
> http://groups.google.com/group/TiddlyWiki/browse_thread/thread/1d1ff4...
Why the extra span? Why not just add the "email" part to the other
macros in the tiddler toolbar?
btw: This only works on relatively small tiddlers - but that's probably
to do with the previously-mentioned limit for the body part. (Or there's
a general 256 chars limit, as is the case with URLs IIRC.)
Nevertheless, good job on this!
-- F.
/HeX
PS: Nobody out there who has a solution to the "alien" character
problem?
Hmm I tried adding just "email" to the macros tiddler toolbar line but
that had no effect. I.e. no button was visible. I had actually to
include the whole span part aswell in order to get the email button
show up. Strange...
Thank you for the clarification Simon.
/HeX
HeX and I have made some modifications to make this work with a number
of special chars (umlauts, currency symbols etc.).
You can find the macro here:
http://devpad.tiddlyspot.com/#eMailMacro
(I hope I got the author attributions right - please let me know if
there are any corrections to be made.)
-- F.