I am trying to add line breaks to a editor placeholder in Xamarin with XAML. Unfortunately I cant use \n or < br/> for new lines.
Does anyone have a idea how to work around this behavior?
I tried this and it wont work:
<Editor Placeholder="This is one line \n this is the next one."/>
Expected result:
This is one line this is the next one.
My result:
This is one line \n this is the next one.
You should be able to use
, i.e.:
<Editor Placeholder="This is one line
this is the next one."/>
The &# notation is a XML encoding for special characters. See also this article on Wikipedia.
Related
I´m developing an app in xamarin and I have the next scenario.
I have a label with maxLines = 3, for some long words in german or french the line break doesn't separate the words syllabels correctly, for example the correct separation of the word "Bezirksschornsteinfegermeister" is "Bezirkss–chorn–ste–in–fegermeis–ter" but in the app is showing like this
It should be Bezirksschorn(First Line) steinfegermeister(Second Line)
This is my code
<Label
Margin="24,0,24,14"
FontSize="18"
HorizontalTextAlignment="Center"
LineBreakMode="TailTruncation"
MaxLines="3"
Text="Bezirksschornsteinfegermeister"
VerticalTextAlignment="End" />
The line break for long words works fine for english words but not for german or french words. There is any library that make a correct line break separation for german and french?
If you go through the options for LineBreakMode in the official docs as below:
HeadTruncation – truncates the head of the text, showing the end.
CharacterWrap – wraps text onto a new line at a character boundary.
MiddleTruncation – displays the beginning and end of the text, with the middle replace by an ellipsis.
NoWrap – does not wrap text, displaying only as much text as can fit
on one line.
TailTruncation – shows the beginning of the text, truncating the end.
WordWrap – wraps text at the word boundary.
Obviously,we can't divide a long string into separate words.You may need add spacing or other characters to separate words.
This isn't a Xamarin issue, if you are testing on Android then German language is not supported, only English, check this issue. Not sure about the iOS.
So I query that pulls text from a column called "description."
Each description contains a list like so:
1) Some text here
2) Some text here
3) Some text here
The problem is when I run the query in my zsh script the new lines return a "+" symbol instead of a carriage return.
1) Some text here + 2) Some text here + 3) Some text here...
The code is
tempdescriptionday4=$(/Applications/Postgres.app/Contents/Versions/12/bin/psql -h 1.1.1.1 -p5555 -U myuser mytable -t -c "SELECT description FROM cycle_10 WHERE air_date = 2020-11-10"
I'm trying to inject this list into an XML file for an RSS feed but I'm stuck on how to format this properly. I tried replacing the + symbol with
but that didn't work--I still am not getting a new line. Any ideas?
Found this in the postgresql12 manual — it's called:linestyle
"Sets the border line drawing style to one of ascii, old-ascii, or unicode. Unique abbreviates are allowed. (that would mean one letter is enough.) The default setting is ascii. This option only affects the aligned and wrapped output formats"
So for me since I have multiple lines in a cell it "wraps" the text at the end making it a wrapped output format.
"ascii style uses plain ASCII characters. Newlines in data are shown using a + symbol in the right-hand margin." When the wrapped format wraps data from one line to the next without a new line character, a dot"." is shown in in the right-hand margin of the first line, and again in the left-hand margin of the following line."
There's also "old-ascii" style that uses a ":" for wrapping and a "unicode" style which uses an ellipsis symbol in the right and margin of first line.
So the problem I have is that the output format is using ASCII by default when there's no available option for XML output style for new lines. Bummer.
Turning linestyle off fixes removing the + symbol but I want the outputted linestyle to be XML so if it strips any new line indication there's no way for me to format it. "-A --no-align Switches to unaligned output mode. (The default output mode is aligned.) This is equivalent to \pset format unaligned."
So I used awk to substitute the + symbol for
and also tried
but those are not creating new lines for me? It validates as proper XML.
I have a v-textarea with the following properties:
<v-textarea
v-model="pmidInput"
name="input-PMID"
label="PMID Area"
value
hint="11111111,2222222,33333333"
></v-textarea>
I need to be able to read the textarea line by line so if a person puts in line feeds I can replace them with a comma and end up with a comma separated string.
I tried to use
let splitLines = this.pmidInput.split(" ");
to put each line into an array but it does not seem to identify the white space, it sees the value fine just not the white space. Is there a way that would work?
I figured out what I needed:
let splitLines = this.pmidInput.split("\n");
I am using emmet with Coda 2, version 2.6.6. When I use it to create multiple lines, Coda is showing some sort of end of line character.
For instance, if I use section.container>div*4>{$}, I get the following:
At the end of the first three divs is a some sort of EOL character, and I don't know how to get rid of it. I looked through the editor preferences and did not see anything that would allow me to hide that character. I've tried it on two different macs and have the exact same results.
Is there a way to get rid of it.
I've noticed this recently in 2.5.16. it may be related to having mixed line endings.
If you go to Text > Line Endings > Convert to (whatever type of line endings you use), it should clear the symbol.
I'm creating the description of a number of resources using the python ckanapi. I'd like to create line breaks, which is easy if using the UI (two spaces followed by return key) but I can't figure out how to do it over the api.
Is there a way to start text on a new line using markdown?
line break in markdown:
<br/>
I was struggling with this as well. For me, two spaces followed by \n worked.
So: First line \nSecond line