Soren,

Did you try using the <p> tags themself?

Most html is past through.

I feel your pain, I was using and modifying previous mailto implementation 
and something was so fragile I have up after hours of frustration each time.

Regards
Tony

On Thursday, May 28, 2020 at 7:52:44 AM UTC+10, Soren Bjornstad wrote:
>
> I'm trying to implement a mailto: based mail-merge in TiddlyWiki and am 
> 95% of the way there borrowing the code provided in this thread: 
> https://groups.google.com/forum/#!searchin/tiddlywiki/tiddlywiki$20mail$20merge|sort:relevance/tiddlywiki/wNpULbptm4w/h3He4gbGAwAJ
>
> However, the tiddlerencoded macro there seems to omit all paragraph breaks 
> from the tiddler containing the email message when performing URL encoding 
> (it doesn't insert %0A, or anything else, to represent a newline in the 
> URL-encoded string where they are in the tiddler). It's kind of hard to 
> write a non-trivial email without using any paragraph breaks, so this is a 
> big problem! Is there any way I can make it keep them? I don't mind editing 
> the tiddler containing the message, but I can't find any markup that will 
> generate a paragraph break. If I write <br> at the end of a paragraph, it 
> puts in *one* newline, but I need two for a proper paragraph break, and 
> if I put more than one <br>, TiddlyWiki renders it as an extra newline, but 
> the URL-encoding version only includes a single %0A.
>
> I did modify the macro a little bit, so as to allow field references 
> within the email tiddler (basically, I just added the || before 
> $template$). The original macro didn't include newlines either, so this 
> doesn't seem to be the fault of my modification. Here's what I have 
> currently:
> \define tiddlerencoded(template)
> <$wikify name="mytext" text="{{||$template$}}">
>   <$list filter="[<mytext>encodeuri[]]" variable="mywikifiedtext">
>     <$text text=<<mywikifiedtext>>/>
>   </$list>
> </$wikify>
> \end
>
> Example invocation: <<tiddlerencoded EmailTemplateTest>> -- where 
> EmailTemplateTest is any tiddler containing newlines.
>
> I tried changing the type of EmailTemplateTest to text/plain, and that 
> made the paragraph breaks show up properly, but then the TextReferences in 
> it don't get replaced, which I need to be able to do.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9402db07-a1dc-45da-846d-8de685832b2d%40googlegroups.com.

Reply via email to