WPCubed Product Support

RTF to HTML

Hello.
When i parse the RTF from WPRichText into HTML there are some attributes that bother me.

1)
In the WPRichText-Component, the font-size is 13 , 14 or 15. After parsing to HTML all words are "size=3".
How can i adapt it?

2)
Images are saved with e.g.
style="width:5.89in;height:4.42in;"

but i need the size in px
How can i change it?

Thanks for the support

#1 ♥ 0
4.2k Views 2 users read 2 min
support

HTML export is done by unit WPIOHTML - reading the source there will answer some questions.

The font-size uses the HTML standars which do not use exact definitions.

You need to use span styles then, use the format string 'HTML-WriteSPAN' to activate this mode.

Images uses exact widths and height definitions. Pixel are not exact because they depend on the resolution of the output device.

But when using 'HTML-UseSTDWidthHeight,-WriteSPAN' the standard width/height valuies are written which are based on pixel (and assume 96 dpi)

Julian

#2 ♥ 0

Ok, thanks.
It worked fine.
But i have some trouble with tables.

1)
<table width=100% style="border-style:solid;border-width:0.04in...
is still in inch
but the border-width of the rows are in px
<td style="background-color:white;border-style:solid;border-width:1px...

How can i get it like this:
border="1" ?

And how can i change the border style?

Is it possible that the component has a problem with the border-width of the table? I can set it to 20 inch, but the WPRichtText shows it like a normal border. But if i parse it to html and display it in a browser its big.

2)
i cant use
CellPadding (WPAT_CellPadding) and CellSpacing (WPAT_CellSpacing)
it just dont work.

3)
is there an easier to create a colored table than
par := par.AppendNewTable(true);
row := par.AppendNewRow(true);
cell := row.AppendNewCell;...

cant i do the same with
WPRichText1.TableAdd(column, rows, [wptblActivateBorders], nil, nil); ?

#3 ♥ 0
This category is archived. No new posts are possible.