Sometimes when I copy part of an abstract from a web page into a tiddler there will be embedded carriage returns or line feeds. So I paste the text into a liste item (prefixed with '# ') and where there is a CRLF the text breaks out of the list item to form a new paragraph. Is there a way in the TW5 editor to select text and remove CRLF from that text so all text from a list item will be in that list item? Or do I have to paste the text into a text editor, join the lines, and paste it back into TW5?
#first item
#"""second item
this is test
that has newlines in it
some are just one CR or LF
and some are doubled, or have more,
like this."""
# third itemThanks Eric but I don't want to keep the literal line breaks in a list item, I want the whole list item to rewrap to the size of the browser window.
input tiddler: <$edit-text tiddler="$:/temp/input" tag="input" default=""/>
original content:
<pre>
<$text text={{{ [title{$:/temp/input}get[text]] }}} />
</pre>
output tiddler: <$edit-text tiddler="$:/temp/output" tag="input" default=""/>
<$button> change linebreaks to spaces
<$action-setfield $tiddler={{$:/temp/output}} text={{{ [title{$:/temp/input}get[text]splitregexp[\n]join[ ]] }}} />
</$button>
result:
<pre>
<$text text={{{ [title{$:/temp/output}get[text]] }}} />
</pre>