Table in center in HTML

General TRichView support forum. Please post your questions here
Post Reply
elGringo
Posts: 35
Joined: Thu Oct 08, 2015 7:01 pm

Table in center in HTML

Post by elGringo » Fri Jun 16, 2017 10:07 am

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

elGringo
Posts: 35
Joined: Thu Oct 08, 2015 7:01 pm

Re: Table in center in HTML

Post by elGringo » Fri Jun 16, 2017 3:03 pm

maybe to use some options?

elGringo
Posts: 35
Joined: Thu Oct 08, 2015 7:01 pm

Re: Table in center in HTML

Post by elGringo » Fri Jun 16, 2017 3:25 pm

ok, i tried

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

elGringo
Posts: 35
Joined: Thu Oct 08, 2015 7:01 pm

Re: Table in center in HTML

Post by elGringo » Sat Jun 17, 2017 5:00 pm

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 viewtopic.php?f=2&t=3163 helped me to decide

Post Reply