Page 1 of 1

RVHTMLImporter and Strikeout Font Attribute

Posted: Thu Apr 27, 2006 2:16 pm
by martindk
The LoadHTML method of the RVHTMLImporter class has a bug in its implementation of the strikeout font attribute. In addtion, RichView exports this attribute with the <s> tag, not the <strike> tag. Finally, both tags have been deprecated in favor of the <del> tag. So, I made the following modification to the LoadHTML method to address these issues:

else if (s = 'strike') or (s = 's') or (s = 'del') then //dkm
begin
WriteTSCR;
CF.Style := Cf.Style + [fsStrikeout];
FindFont(True, CurrLink <> '');
end
else if (s = '/strike') or (s='/s') or (s='/del') then //dkm
begin
WriteTSCR;
CF.Style := Cf.Style - [fsStrikeOut];
FindFont(False, CurrLink <> ''); //dkm - Changed True to False
end

Posted: Thu Apr 27, 2006 6:47 pm
by Sergey Tkachenko
Thank you, I updated RvHtmlImporter corresponding to the latest version of TRichView available for registered users (http://www.trichview.com/resources/html ... mportb.zip)

As for saving, I think <s> is more appropriate than <del>. SaveHTML uses many deprecated tags. For strict HTML with CSS, use SaveHTMLEx