WPCubed Product Support

Load From HTML not displaying properly

When I load the following html file into a WPRichText then the first para displays in default font instead of comic sans as the html indicates wheras all others display correctly

it displays 100% correctly in internet explorer and Firefox

<html>
<head>
</head>
<body>

<style><!--
.Arial{font-family:'Arial';}
.Verdana{font-family:'Verdana';}
.Times_Roman{font-family:'Times New Roman';}
.Georgia{font-family:'Georgia';}
.Comic_Sans{font-family:'Comic Sans MS';}
.Trebuchet{font-family:'trebuchet MS';}

--></style>
<div class="Comic_Sans"><font size=3>Rejuvenates appearance of &nbsp;&nbsp;</font> </div>
<div class="Comic_Sans"><font size=4>the cat sat on the mat</font> </div>
<div class="Verdana"><font size=3>Ingredients: Aqua, Glycerine, Sodium Stearate, Propylene Glycol, Sorbitol, Sodium Laurate, Sodium Laureth Sulfate, Sodium Lauryl Sulfate, Sodium Chloride, Stearic Acid, Lauric Acid, Pentasodium Pentetate, Tetrasodium Etidronate, Titanium Dioxide, Daucus Carota, Citrus Aurantium Sinensis.</font> </div>
<div>&nbsp; </div>

</body>
</html>

#1 ♥ 0
7.1k Views 3 users read 2 min
support

Hi,

Open the file WPIOHTML.pas and locate (seaach for InitStandardProps)

NoNewParagraph := FALSE;                                      InitStandardProps(FDivStack[FDivStackCount], aTag.Name, aTag.ParamString('class'), aTag.ParamString('id'), 0);                                      ApplyAttribs(aTag, FDivStack[FDivStackCount]);

After that insert

//V5.37 - get parameters for first line. Usually DIV paragraphs
//are assigned when first used (they are not nested)
if FCurrentParagraph.PrevPar=nil then
begin
   FCurrentParagraph.Style := FDivStack[FDivStackCount].Style;
   FCurrentParagraph.ACopy(FDivStack[FDivStackCount],0,255);
end;
#4 ♥ 0

I made the update to 5.38 - same problem.

Effect: The first line always change to ".div" style.

I wonder: When the second Line has the same style as the first line - it works fine. Maybe a hint.

#5 ♥ 0
support

Did you inserted the code mentioned above ?

Julian

#6 ♥ 0

@wpsupport:
Did you inserted the code mentioned above ?

The code is already there ...

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