Page 1 of 1

Table in center in HTML

Posted: Fri Jun 16, 2017 10:07 am
by elGringo
hello, as your customer want to ask...
how to keep Table in center, when I save in HTML an then load using rvHTMLImporter it is always has left alignment

i save with method

Code: Select all

rveQuestion.SaveHTMLToStreamEx(ss,'','','','','','',[]);
to database
then load with rvhtmlImporter like this

Code: Select all

RvHtmlImporter.LoadHtml(mQuestion.Lines.Text);
rveQuestion.Format;
it works ok, but alignment of table always left, if i set align table to center - it is not saved in SaveHTMLToStreamEx method

how to fix it?

thanks in advance

Re: Table in center in HTML

Posted: Fri Jun 16, 2017 3:03 pm
by elGringo
maybe to use some options?

Re: Table in center in HTML

Posted: Fri Jun 16, 2017 3:25 pm
by elGringo
ok, i tried

rveQuestion.SaveHTMLEx('123.html','','','','','',[])
table in center and all ok
seems to be a bug

Re: Table in center in HTML

Posted: Sat Jun 17, 2017 5:00 pm
by elGringo
Hello. Final decision is to use

TRVHTMLViewImporter

THTMLViewer

download them and install

write property

Code: Select all

 RVHTMLViewImporter1.HTMLViewer:=HTMLViewer1;
and then load html content from file like this.
all left indents Ok

Code: Select all

RVHTMLViewImporter1.LoadFromFile('123.htm',RichViewEdit1);
RichViewEdit1.Format;
asked myself answered myself - all by myself :D

this http://www.trichview.com/forums/viewtop ... f=2&t=3163 helped me to decide