justify align for rtl text on react-native - react-native

How could I align the RTL text to justify on react-native? As the react-native website says we could set align of text to 'auto', 'left', 'right', 'center', 'justify' but the justify one is not working on RTL text.

text justify not support in react native android native. but there is a trick that you justify your text with WebView Component...
here is a sample code:
<WebView
source={{
html:
"<style>p{text-align:justify}</style>" +
"<p>" +
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus commodo tortor ut ipsum pharetra sodales. Praesent sed diam non lacus convallis dapibus. Sed vulputate erat risus, ac hendrerit eros egestas id. Etiam pellentesque auctor ipsum, non cursus nisi gravida sed. Ut eget pretium risus. Curabitur a lectus odio. Etiam felis urna, pharetra ut odio in, tristique suscipit tortor. Cras vitae risus odio. Etiam a leo elit. Duis molestie fermentum mi vitae pretium. Morbi luctus semper quam, et suscipit nisi convallis dictum. Fusce sit amet est dapibus, interdum ante non, lacinia metus. Donec at nulla non ante consectetur vulputate. Cras tristique porttitor ligula quis posuere. Integer nec laoreet felis, at tempor leo. Ut et convallis quam." +
"</p>"
}}
/>
if you want call your body texts from your server compile to html and use your source in it (this is not a good but only way)

Related

First page after titlepage (with titlepage extension) with too large bottom margin in Quarto for pdf

I am working with Quarto to create a pdf document from rstudio. I use the quarto_titlepages extension to create a title page, which is followed by a text of several pages. The first one of these pages is shown with a very large bottom margin, which is probably a heritage of the title page. However, this only happens with the bottom margin and not with the top one.
I tried re-stablishing the margins in the pdf format section with margin-left, margin-right, margin-bottom and margin-top. Then I tried the same approach but using geometry instead. None of the two options worked.
Here is the code with margin-top and so on.
---
title: "Here we have a title, not too long"
author: "First Author and Second Author"
date: last-modified
date-format: "d-MMMM-YYYY"
lang: "es"
format:
titlepage-pdf:
documentclass: scrreport
titlepage: plain
titlepage-geometry:
- top=90mm
- bottom=60mm
- right=30mm
- left=30mm
titlepage-logo: "images/anyimages.png"
titlepage-bg-image: "images/anyimage2.png"
titlepage-theme:
elements: ["\\titleblock", "\\logoblock", "\\authorblock", "(some additional information)" ]
page-fontfamily: "Helvetica Neue"
page-align: center
title-fontsize: 30
title-align: center
title-fontstyle: []
title-space-after: 3cm
author-fontsize: 16
author-style: plain
logo-align: center
logo-size: 4cm
logo-space-after: 4cm
bg-image-location: "ULCorner"
bg-image-size: 21cm
pdf:
# Fonts
mainfont: Helvetica Neue
fontsize: 12pt
papersize: A4
margin-top: 25mm
margin-bottom: 25mm
margin-left: 25mm
margin-right: 25mm
toc: true
toc-depth: 2
toc-title: Táboa de contidos
editor: visual
---
## Introdución
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec condimentum eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed congue tellus at vehicula interdum. Vivamus dapibus ante vitae rhoncus posuere. Ut ut ipsum nisl. Nullam luctus viverra augue id feugiat. Fusce sollicitudin sed massa eget blandit. Pellentesque tempus lacinia metus, nec facilisis massa varius eget. Proin in felis sed arcu faucibus scelerisque. Sed hendrerit tortor nisl, sed mattis lectus luctus at. Nulla et lorem ac est venenatis posuere. Vivamus eget vehicula purus, sit amet mollis nunc. Phasellus pellentesque nisi eu porttitor egestas. Aliquam a aliquam lectus, eu iaculis mauris.
Suspendisse eu gravida orci. Suspendisse vehicula sagittis libero quis lobortis. Suspendisse potenti. Sed imperdiet ligula eu tellus tincidunt rutrum. Vivamus vel nibh vel lacus efficitur tempus. Maecenas sit amet erat at sapien blandit congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus vel nunc hendrerit, venenatis sapien nec, commodo libero. Ut vehicula porta euismod. Vivamus eu dolor neque. Mauris a dui faucibus, elementum dui nec, condimentum nibh.
Etiam aliquam, arcu eget ornare elementum, leo magna sollicitudin augue, vel dapibus lectus nisi ac ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper lacus mauris, ac maximus lectus volutpat nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed interdum, velit non sollicitudin volutpat, purus tellus aliquam lacus, et scelerisque ex nisi et ex. Vivamus porta purus ac mauris placerat, venenatis suscipit augue accumsan. Cras consequat dapibus efficitur.
Phasellus diam felis, condimentum vitae diam nec, tincidunt bibendum elit. Donec condimentum, orci in euismod vestibulum, sapien massa maximus lectus, vel interdum magna magna non lectus. Integer vitae nunc nec urna feugiat venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent sapien velit, molestie nec molestie vel, sodales at mauris. Maecenas accumsan malesuada ipsum eget pellentesque. Nam aliquet leo sit amet felis facilisis facilisis. Vivamus aliquam iaculis eros, non bibendum elit convallis ut. Quisque ut varius arcu. Vivamus pellentesque nisi vitae nisi vulputate, quis dapibus est efficitur. Aenean eget ipsum in lorem aliquet efficitur aliquet a est. In sit amet vehicula eros. Donec dui nulla, ultrices ut nisi non, ornare viverra ante.
Proin facilisis sit amet velit placerat porttitor. In congue risus id tempus congue. Cras rutrum justo at ultricies faucibus. Ut sed turpis nec nulla malesuada feugiat sed eu risus. In mattis eu tellus sit amet commodo. Nam molestie vulputate ullamcorper. Curabitur egestas ligula ut urna blandit faucibus.
And this is what I get in the two pages after the title page
UPDATE
I solved it partially, by following samcarter_is_at_topanswers.xyz's advice (using \restoregeometry). Then I realized that it was not only geometry, but I was also losing all other formats detailed under pdf:. To solve it I erased the pdf: line; that is, all pdf formats should directly go under "titlepage-pdf:". But, again, by doing so, the first page appeard with a large bottom margin, even when using \restoregeometry.
This is my code now:
---
title: "Here we have a title"
author: "Author 1 with surname & Author 2 with surname"
date: last-modified
date-format: "d-MMMM-YYYY"
lang: "es"
format:
titlepage-pdf:
documentclass: scrreport
titlepage: plain
titlepage-geometry:
- top=90mm
- bottom=60mm
- right=30mm
- left=30mm
titlepage-logo: "images/circularNegro.png"
titlepage-bg-image: "images/OsTres.png"
titlepage-theme:
elements: ["\\titleblock", "\\logoblock", "\\authorblock", "(some additional text)" ]
page-fontfamily: "Helvetica Neue"
page-align: center
title-fontsize: 30
title-align: center
title-fontstyle: []
title-space-after: 3cm
author-fontsize: 16
author-style: plain
logo-align: center
logo-size: 4cm
logo-space-after: 4cm
bg-image-location: "ULCorner"
bg-image-size: 21cm
# Fonts
mainfont: Helvetica Neue
fontsize: 12pt
papersize: A4
margin-top: 25mm
margin-bottom: 25mm
margin-left: 25mm
margin-right: 25mm
toc: true
toc-depth: 2
toc-title: Táboa de contidos
editor: visual
---
\restoregeometry
## Introdución
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec condimentum eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed congue tellus at vehicula interdum. Vivamus dapibus ante vitae rhoncus posuere. Ut ut ipsum nisl. Nullam luctus viverra augue id feugiat. Fusce sollicitudin sed massa eget blandit. Pellentesque tempus lacinia metus, nec facilisis massa varius eget. Proin in felis sed arcu faucibus scelerisque. Sed hendrerit tortor nisl, sed mattis lectus luctus at. Nulla et lorem ac est venenatis posuere. Vivamus eget vehicula purus, sit amet mollis nunc. Phasellus pellentesque nisi eu porttitor egestas. Aliquam a aliquam lectus, eu iaculis mauris.
Suspendisse eu gravida orci. Suspendisse vehicula sagittis libero quis lobortis. Suspendisse potenti. Sed imperdiet ligula eu tellus tincidunt rutrum. Vivamus vel nibh vel lacus efficitur tempus. Maecenas sit amet erat at sapien blandit congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus vel nunc hendrerit, venenatis sapien nec, commodo libero. Ut vehicula porta euismod. Vivamus eu dolor neque. Mauris a dui faucibus, elementum dui nec, condimentum nibh.
Etiam aliquam, arcu eget ornare elementum, leo magna sollicitudin augue, vel dapibus lectus nisi ac ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper lacus mauris, ac maximus lectus volutpat nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed interdum, velit non sollicitudin volutpat, purus tellus aliquam lacus, et scelerisque ex nisi et ex. Vivamus porta purus ac mauris placerat, venenatis suscipit augue accumsan. Cras consequat dapibus efficitur.
Phasellus diam felis, condimentum vitae diam nec, tincidunt bibendum elit. Donec condimentum, orci in euismod vestibulum, sapien massa maximus lectus, vel interdum magna magna non lectus. Integer vitae nunc nec urna feugiat venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent sapien velit, molestie nec molestie vel, sodales at mauris. Maecenas accumsan malesuada ipsum eget pellentesque. Nam aliquet leo sit amet felis facilisis facilisis. Vivamus aliquam iaculis eros, non bibendum elit convallis ut. Quisque ut varius arcu. Vivamus pellentesque nisi vitae nisi vulputate, quis dapibus est efficitur. Aenean eget ipsum in lorem aliquet efficitur aliquet a est. In sit amet vehicula eros. Donec dui nulla, ultrices ut nisi non, ornare viverra ante.
Proin facilisis sit amet velit placerat porttitor. In congue risus id tempus congue. Cras rutrum justo at ultricies faucibus. Ut sed turpis nec nulla malesuada feugiat sed eu risus. In mattis eu tellus sit amet commodo. Nam molestie vulputate ullamcorper. Curabitur egestas ligula ut urna blandit faucibus.
And this is what I get:
The problem is that quarto and/or the titlepage extension issues \restoregeometry at the wrong place. If one looks at the intermediate .tex file, one will see code like this:
...
\clearpage
\restoregeometry
%%% TITLE PAGE END
\end{titlepage}
...
However \restoregeometry needs to be used after the title page is closed (it would also make more sense to have the \clearpage after the title page...)
You can work around it my manually adding one more \restoregeometry before your text:
---
title: "Here we have a title, not too long"
author: "First Author and Second Author"
date: last-modified
date-format: "d-MMMM-YYYY"
lang: "es"
format:
titlepage-pdf:
documentclass: scrreport
titlepage: plain
titlepage-geometry:
- top=90mm
- bottom=60mm
- right=30mm
- left=30mm
titlepage-logo: "example-image-duck"
titlepage-bg-image: "example-image-duck"
titlepage-theme:
elements: ["\\titleblock", "\\logoblock", "\\authorblock", "(some additional information)" ]
page-fontfamily: "Helvetica Neue"
page-align: center
title-fontsize: 30
title-align: center
title-fontstyle: []
title-space-after: 3cm
author-fontsize: 16
author-style: plain
logo-align: center
logo-size: 4cm
logo-space-after: 4cm
bg-image-location: "ULCorner"
bg-image-size: 21cm
editor: visual
---
\restoregeometry
## Introdución
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec condimentum eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed congue tellus at vehicula interdum. Vivamus dapibus ante vitae rhoncus posuere. Ut ut ipsum nisl. Nullam luctus viverra augue id feugiat. Fusce sollicitudin sed massa eget blandit. Pellentesque tempus lacinia metus, nec facilisis massa varius eget. Proin in felis sed arcu faucibus scelerisque. Sed hendrerit tortor nisl, sed mattis lectus luctus at. Nulla et lorem ac est venenatis posuere. Vivamus eget vehicula purus, sit amet mollis nunc. Phasellus pellentesque nisi eu porttitor egestas. Aliquam a aliquam lectus, eu iaculis mauris.
Suspendisse eu gravida orci. Suspendisse vehicula sagittis libero quis lobortis. Suspendisse potenti. Sed imperdiet ligula eu tellus tincidunt rutrum. Vivamus vel nibh vel lacus efficitur tempus. Maecenas sit amet erat at sapien blandit congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus vel nunc hendrerit, venenatis sapien nec, commodo libero. Ut vehicula porta euismod. Vivamus eu dolor neque. Mauris a dui faucibus, elementum dui nec, condimentum nibh.
Etiam aliquam, arcu eget ornare elementum, leo magna sollicitudin augue, vel dapibus lectus nisi ac ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper lacus mauris, ac maximus lectus volutpat nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed interdum, velit non sollicitudin volutpat, purus tellus aliquam lacus, et scelerisque ex nisi et ex. Vivamus porta purus ac mauris placerat, venenatis suscipit augue accumsan. Cras consequat dapibus efficitur.
Phasellus diam felis, condimentum vitae diam nec, tincidunt bibendum elit. Donec condimentum, orci in euismod vestibulum, sapien massa maximus lectus, vel interdum magna magna non lectus. Integer vitae nunc nec urna feugiat venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent sapien velit, molestie nec molestie vel, sodales at mauris. Maecenas accumsan malesuada ipsum eget pellentesque. Nam aliquet leo sit amet felis facilisis facilisis. Vivamus aliquam iaculis eros, non bibendum elit convallis ut. Quisque ut varius arcu. Vivamus pellentesque nisi vitae nisi vulputate, quis dapibus est efficitur. Aenean eget ipsum in lorem aliquet efficitur aliquet a est. In sit amet vehicula eros. Donec dui nulla, ultrices ut nisi non, ornare viverra ante.
Proin facilisis sit amet velit placerat porttitor. In congue risus id tempus congue. Cras rutrum justo at ultricies faucibus. Ut sed turpis nec nulla malesuada feugiat sed eu risus. In mattis eu tellus sit amet commodo. Nam molestie vulputate ullamcorper. Curabitur egestas ligula ut urna blandit faucibus.

groff putting single word on line after trap

I have a groff document, however, when I set the trap to create a footer, groff puts one word after the specified height, then executes the macro for the trap. I am compilinig the document with groff -Tpdf -P-pletter ex.groff > ex.pdf.
ex.groff:
.de foot
. bp
..
.wh -1i foot
.ls 2
.nh
.ad l
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
In pulvinar, ex id ultricies tincidunt, ligula neque hendrerit velit, id feugiat enim nisl eu justo.
In bibendum elementum auctor.
Fusce dapibus sed nulla in malesuada.
Ut vehicula ultrices nibh, at iaculis est consectetur vitae.
Phasellus condimentum est in elit ultrices mattis.
Mauris orci sem, dictum eleifend augue vitae, fermentum convallis nunc.
In semper vitae nunc a congue.
Pellentesque pretium risus vitae turpis mollis, a blandit lacus vestibulum.
Vivamus congue urna mauris, ac viverra ipsum tristique id.
Maecenas mauris massa, ullamcorper eu fringilla consequat, molestie ac nunc.
Etiam luctus tortor id odio fringilla, eu eleifend leo imperdiet.
.br
Integer venenatis et mi dignissim dictum.
Duis rutrum tortor lectus, eget pulvinar risus viverra id.
Vivamus vel vestibulum neque, in posuere libero.
Praesent eu erat ut ligula consequat consectetur sed nec magna.
Pellentesque vitae rhoncus felis.
Suspendisse potenti.
Nullam in sodales nisi.
Nulla vitae tempus sem, non laoreet felis.
.br
Fusce velit metus, condimentum non ultricies facilisis, dignissim eu diam.
Donec lorem ante, pulvinar et congue non, iaculis ac leo.
Nam sit amet risus dui.
Mauris lorem nunc, facilisis non odio dapibus, gravida posuere leo.
Quisque pellentesque tincidunt dolor sed eleifend.
Nam eget augue feugiat, tincidunt orci et, tempor quam.
Suspendisse purus mi, mollis quis porta quis, tincidunt vel odio.
Pellentesque nisl sapien, posuere sed accumsan eget, elementum vel est.
Maecenas cursus neque quis arcu varius, at efficitur dui dictum.
.br
Etiam semper ultrices ipsum, eget gravida risus condimentum vel.
Suspendisse sed tincidunt lectus.
Suspendisse faucibus gravida lorem, vel volutpat eros hendrerit nec.
Vestibulum ac leo eget metus sollicitudin rhoncus.
Fusce venenatis ligula a sodales varius.
Etiam mauris nisi, ultricies eu ex quis, vehicula facilisis nulla.
Pellentesque eu arcu nec urna tempor fringilla.
Sed consectetur, leo at convallis finibus, nunc mi feugiat dolor, a tincidunt tortor ipsum vitae sem.
Vestibulum tincidunt, nisl vel hendrerit consequat, leo felis rutrum tellus, quis tempor odio leo in lectus.
Donec placerat tempor turpis nec efficitur.
Donec quis erat a augue tempor lacinia sit amet ac felis.
Donec a dui ut diam tempus cursus.
Sed auctor, lorem sed interdum blandit, erat dui tristique dolor, vitae condimentum lorem dui ac augue.
.br
Phasellus et dignissim lacus.
Vestibulum a dolor sodales est bibendum sodales.
Nulla gravida erat lacus, in placerat sapien consequat id.
Donec vitae pulvinar neque.
Etiam a semper augue.
Phasellus sed justo id velit imperdiet finibus.
Nam eget vulputate orci, ac congue nunc.
Pellentesque sollicitudin, nulla quis luctus pulvinar, velit ex feugiat leo, sed euismod ante odio at est.
Duis velit sapien, ornare vel vulputate in, consectetur non neque.
Curabitur non libero at magna venenatis cursus et vel urna.
.br
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
In pulvinar, ex id ultricies tincidunt, ligula neque hendrerit velit, id feugiat enim nisl eu justo.
In bibendum elementum auctor.
Fusce dapibus sed nulla in malesuada.
Ut vehicula ultrices nibh, at iaculis est consectetur vitae.
Phasellus condimentum est in elit ultrices mattis.
Mauris orci sem, dictum eleifend augue vitae, fermentum convallis nunc.
In semper vitae nunc a congue.
Pellentesque pretium risus vitae turpis mollis, a blandit lacus vestibulum.
Vivamus congue urna mauris, ac viverra ipsum tristique id.
Maecenas mauris massa, ullamcorper eu fringilla consequat, molestie ac nunc.
Etiam luctus tortor id odio fringilla, eu eleifend leo imperdiet.
which produces the undesired word right after the trap height (the word on the final line should be on the next page)
How can I make it so this word appears on the next page, instead of right where the trap should be?
I dont have the reference to hand, but from my notes, in the table listing the basic troff commands we have
.bp +-N N=1 Bbv new page. number of next page
where Bbv are a set of flags including this: b will cause line break unless use ' instead of . so the answer is to define your macro to call 'bp instead of .bp.
.de foot
' bp
..
The online groff doc briefly says about requests:
A request line begins with a control character, which is either a
single quote (', the no-break control character) or a period (., the normal control character).
and for bp has an example using 'bp.

Can I use CSS tables to place an image and text side-by-side, without knowing the image width in advance?

I want to have a vertical stack of blocks; each block has an image on the left and text (heading and paragraphs) on the right.
I would like the image to be its natural width and the text to use the remaining width in the parent element.
This is similar to a table, but the images in different blocks have different widths. So the first "column" in the table is not of constant width.
Floating the image left does not work, because if the text has a greater height than the image, the text wraps underneath the image.
CSS tables don't seem to work, because the CSS does not know the differing image widths from block to block.
My "block" element CSS includes 'display: table-row;'. My image element and my text element CSS include 'display: table-cell;'. The result is that some images are their natural sizes; others are smaller than their natural sizes.
This seems to be related to the amount of text: one line of text gets a natural size image; two lines squeezes the image a few pixels; 15 lines squeezes the image to about one-half size.
I would welcome suggestions for how to accomplish my goal.
I think that can be resolved by display flex. Documentation W3C: https://www.w3schools.com/css/css3_flexbox.asp
Try this:
HTML
<div class="row" style="width: 100%">
<img src="https://image.shutterstock.com/image-photo/salesman-offering-cheese-samples-customers-600w-414153787.jpg"/>
<div>
<h2>Head</h2>
<p>
Suspendisse eu scelerisque odio. Quisque hendrerit malesuada risus ut imperdiet. Nulla facilisi. Aenean bibendum risus et mi rutrum convallis. Phasellus ornare orci leo, eget faucibus tortor egestas at. Aliquam iaculis, metus dignissim vulputate dignissim, est metus condimentum nulla, at maximus neque tellus non erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse porttitor, magna ut lacinia blandit, est ligula sagittis nulla, nec interdum erat velit sit amet velit. Sed ut ante at enim accumsan ultricies porta quis neque. Vestibulum volutpat ipsum eget libero malesuada volutpat. Praesent sed porta tellus. Praesent ac volutpat justo.
</p>
</div>
</div>
<div class="row" style="width: 70%">
<img src="https://image.shutterstock.com/image-photo/salesman-holding-cutting-board-assorted-260nw-407934532.jpg"/>
<div>
<h2>Head</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse luctus massa nec fermentum egestas. Sed feugiat, nisl vitae dictum accumsan, felis odio elementum eros, imperdiet faucibus mi nisi convallis dolor. Mauris interdum maximus neque, in convallis erat facilisis porttitor. Sed ac tortor imperdiet, efficitur nisi nec, efficitur massa. Integer consectetur nec nunc ac porta. Proin non ultricies lorem, rhoncus laoreet ligula. Donec condimentum mauris id urna placerat dapibus. Cras consequat, quam vitae semper luctus, mi tortor finibus augue, sed vestibulum odio lorem at tellus. Fusce eu urna eget ante mollis vestibulum. Nullam ante eros, convallis vitae hendrerit at, volutpat id dui.
</p>
</div>
</div>
<div class="row" style="width: 80%">
<img src="https://image.shutterstock.com/image-photo/salesman-offering-cheese-samples-customers-600w-414153787.jpg"/>
<div>
<h2>Head</h2>
<p>
Suspendisse eu scelerisque odio. Quisque hendrerit malesuada risus ut imperdiet. Nulla facilisi. Aenean bibendum risus et mi rutrum convallis. Phasellus ornare orci leo, eget faucibus tortor egestas at. Aliquam iaculis, metus dignissim vulputate dignissim, est metus condimentum nulla, at maximus neque tellus non erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse porttitor, magna ut lacinia blandit, est ligula sagittis nulla, nec interdum erat velit sit amet velit. Sed ut ante at enim accumsan ultricies porta quis neque. Vestibulum volutpat ipsum eget libero malesuada volutpat. Praesent sed porta tellus. Praesent ac volutpat justo.
</p>
</div>
</div>
CSS:
.row {
display: flex;
}
.row img {
flex-grow: 1;
height: max-content;
}
.row div {
margin-left: 10px;
}
https://jsfiddle.net/ymuxdtg6/

Is is possible to load more testdata with liquibase

I want to load a whole html file as testdata with liquibase. So far I've used the approach with loading testdata from csv file, but it is not designed to handle huge html's.
Is there a way to achieve it?
Here is an example to make it clear:
I have a table named Movie. The fields are: id, title, description. In a databaseChangeLog section I point to a file where I store the testdata:
<loadData encoding="UTF-8"
file="config/liquibase/testdata/movie.csv"
separator=";"
tableName="movie"/>
The content is as follows:
id;title;description
1;Titanic;great movie
2;Forrest Gump;another great movie
Now I want to change the description to something that is closer to the real usecase. Lets say this HTML:
<div id="lipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce porta pulvinar lacus eget egestas. Ut quis efficitur turpis. Nunc tincidunt turpis lorem, eget vestibulum nisi sodales at. Quisque in tortor et sapien ornare venenatis. Integer pulvinar nec ipsum malesuada porta. Sed massa metus, condimentum non varius ornare, sollicitudin at dui. Praesent porta, ante et interdum convallis, tellus augue tempus nisl, sit amet mollis augue nisl vel metus.
</p>
<p>
Nam quis libero rhoncus, facilisis magna ut, bibendum urna. Nullam sit amet volutpat turpis. Praesent eget aliquet orci. Duis dignissim tellus erat, eget fermentum augue dapibus sed. Quisque vitae est ipsum. Quisque sit amet libero eget nisi faucibus maximus vel a sem. Proin maximus neque arcu, sit amet eleifend dolor ornare at. Suspendisse laoreet lobortis tellus sed consequat. Nunc commodo ligula eget neque porta consectetur. Mauris sagittis elit in sodales luctus.
</p>
</div>
The content won't fit into the csv file. I could delete all the newlines, but it makes the file unmaintainable.
loadData has a column attribute which in turn has a valueClobFile attribute where you could put in a path to a (html) file.
Checkout these two files in the liquibase integration tests that show a use of this:
batchInsert.changelog.xml
batchInsert.csv

PHPStorm: reformat long comments

How do I reformat long (doc) comments in my code? Hitting "reformat" doesn't work. For example when I have this in my code:
/**
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porta ac urna quis sagittis. Nam risus leo, ultricies
* id ante sed, bibendum rutrum diam.
* Suspendisse viverra dui et ligula aliquet, sit amet mattis magna consequat. Morbi venenatis tempus mattis.
* Praesent mollis quam non turpis laoreet placerat.
*/
How do I turn it into this?
/**
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porta ac urna quis sagittis. Nam risus leo, ultricies
* id ante sed, bibendum rutrum diam. Suspendisse viverra dui et ligula aliquet, sit amet mattis magna consequat. Morbi
* venenatis tempus mattis. Praesent mollis quam non turpis laoreet placerat.
*/
Such functionality is not currently available in PhpStorm.
But you may try Wrap to Column plugin -- it may do OK for you (seems to work -- based on very quick test).
Related tickets:
http://youtrack.jetbrains.com/issue/WI-374
http://youtrack.jetbrains.com/issue/WI-3713
http://youtrack.jetbrains.com/issue/WI-13469
http://youtrack.jetbrains.com/issue/WI-18264