On Tuesday, October 1, 2013 11:59:06 AM UTC-7, skye riquelme wrote:
>
> I have a simple TW that opens from a bookmarklet.......the TW is basically 
> a html form that uses information passed to it 
> ....have the form create a tiddler with the information....and store that 
> tiddler in the appropriate TW.....so the form has a number of "submit" 
> buttons with code such as -
> <input type="submit" value="eAi" onclick='
> ... 
>
localStorage.text="Fonte: "+f.url.value+"\nCitando: 
> "+f.citado.value+"\nNotas: "+f.comment.value;
> store.saveTiddler(f.titulo.value, f.titulo.value, localStorage.text, 
> localStorage.username, new Date(), f.tags.value, "");
> ... 
>
>
> all this works..... EXCEPT.....note that the text line construct formats 
> the text using linebreaks ("\n")...... this breaks the store.saveTiddler 
> parameters and this macro fails to work. If I remove the "\n" from this 
> code...the store.saveTiddler macro works perfectly.... BUT the text is not 
> formated with the linebreaks in the tiddler at the other end...which makes 
> reading the information a little cumbersome.
>

If I recall correctly, you are using HTMLFormattingPlugin in most of your 
TW documents.  HTMLFormattingPlugin has special pre-processing handling of 
newlines (\n).  If your form is "pure" HTML (i.e., no TiddlyWiki syntax 
mixed in), then use the "<nowiki>" psuedo-HTML tag to prevent the plugin 
from converting newlines, like this:

<html><nowiki>...<form>...<input ...>...</form></html>

note: there is no matching </nowiki>... the presense of "<nowiki>" in the 
HTML block prevents newline conversion within the *entire* block.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to