I will test your assumption and agree or contradict them soon. I have built single file wikis that do not have this problem. In fact I designed a hack once to do something similar intentionaly.
I will test my working solution to see if I can cause your outcomes.
Regards
Tony
<$edit-text tag="textarea" tiddler="testing" field="myfield"/>
This is
another line
and another one
This is
another line
and another one
white-space: pre-wrap;
Note that the resulting field can look like all linebreaks are stripped due to how its rendered. Especially if viewing the field in the info section of the tiddler, as it is rendered in a table cell instead of a paragraph.Use something like {{testing!!myfield}} instead to confirm linebreaks are properly saved.
<$button>Do transfer
<$list filter="[[That Tiddler]]" >
<$action-setfield saveme={{!!text}} />
</$list>
</$button>
{{That Tiddler!!text}}
test it without that step.
Regards
Tony
<$button>Do transfer
<$list filter="[[That Tiddler]]" >
<$action-setfield saveme={{!!text}} />
</$list>
</$button>
{{That Tiddler!!text}}
<$button>Transfer back
<$list filter="[[That Tiddler]]" >
<$action-setfield text={{!!saveme}} />
</$list>
</$button>
This suggests that if you start with a tid file on node.js, and then modify it, it doesn't know to change to a JSON.
@Mark
Personally I find the JSON saving for multiline fields on node.js lacking and a deal breaker for use of multiline fields, it negates the advantage of having content in a format easily editable in external editors which is why I run node.js in the first place.
What is the occasion or use case for which you need to externally edit tiddlers?
I'm thinking that maybe what TW should do is encode just a field as JSON.
In my case, I need the multi-lines, or else my node project will be breaking all the time. I'm thinking the simplest solution would be to encode line endings with my own code structure. The only problem being that someone could accidentally use those same symbols in their own text. For instance, if documenting what replacement symbols were used to indicate end of line, that documentation would have the symbols in it.
You could also merge that patch in a local copy of the repo and run that until it is officially merged.
[has[multiline]then[.json]]