RVHTMLImporter and Strikeout Font Attribute

General TRichView support forum. Please post your questions here
Post Reply
martindk
Posts: 2
Joined: Thu Apr 27, 2006 2:08 pm

RVHTMLImporter and Strikeout Font Attribute

Post 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
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
Post Reply