How do I send a newline character from a button?

69 views
Skip to first unread message

Mike Andyl

unread,
Jul 3, 2021, 9:08:35 AM7/3/21
to TiddlyWiki
Let's say I have a code for a button:
<$button>
<$action-sendmessage $message="tm-new-tiddler"
text='Line 1 Line 2'
/>
New
</$button>

How can I split the lines so that in the editor they would be in a couple of lines, and not one?

Line 1
Line 2

Similar to "/r/n"

Siniy-Kit

unread,
Jul 3, 2021, 9:24:05 AM7/3/21
to TiddlyWiki
Line 1 <br> Line 2

суббота, 3 июля 2021 г. в 16:08:35 UTC+3, miket...@gmail.com:

Mike Andyl

unread,
Jul 3, 2021, 10:27:36 AM7/3/21
to TiddlyWiki
No, this is for the finished text, but I need it for the editor.

суббота, 3 июля 2021 г. в 16:24:05 UTC+3, Siniy-Kit:

Eric Shulman

unread,
Jul 3, 2021, 10:37:31 AM7/3/21
to TiddlyWiki
On Saturday, July 3, 2021 at 6:08:35 AM UTC-7 miket...@gmail.com wrote:
Let's say I have a code for a button:
<$button>
<$action-sendmessage $message="tm-new-tiddler"
text='Line 1 Line 2'
/>
New
</$button>
How can I split the lines so that in the editor they would be in a couple of lines, and not one?

Symbolic newlines such as "\r\n" are not supported within parameter values, but you can embed actual newlines in the parameter value, like this:
<$action-sendmessage $message="tm-new-tiddler"
text='Line 1
Line 2'/>

enjoy,
-e

Mike Andyl

unread,
Jul 3, 2021, 11:06:30 AM7/3/21
to TiddlyWiki
Thanks a lot, I wouldn't have checked it myself! ))

суббота, 3 июля 2021 г. в 17:37:31 UTC+3, Eric Shulman:

TW Tones

unread,
Jul 4, 2021, 7:51:53 AM7/4/21
to TiddlyWiki
The pre-release boasts a new operator that may help here


Tones
Reply all
Reply to author
Forward
0 new messages