Internal CSS with rvhtmlimport

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Internal CSS with rvhtmlimport

Post by jgkoehn »

I am trying:

Code: Select all

<!DOCTYPE html>
<html>
<head>
<style>
h1 {
  color: blue;
  font-family: verdana;
  font-size: 300%;
}
p {
  color: red;
  font-family: courier;
  font-size: 160%;
}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
And I don't get the color attributes, or font. Ideas???
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Internal CSS with rvhtmlimport

Post by Sergey Tkachenko »

RvHtmlImporter does not support CSS (with few exceptions)
There is an alternative, TrvHtmlViewImporter (see <TRichView Dir>\ThirdParty\rvHtmlViewImporter\ReadMe.txt)
And I plan to implement HTML import (with CSS) without additional components later in this year.
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: Internal CSS with rvhtmlimport

Post by jgkoehn »

Excellent, I look forward to it.
Out of curiosity will it use a tag parser similar to rvhtmlimport? (I am just thinking ahead to using it for our needs.)
Also will the footnote, endnotes of an html,xhtml, epub truly be turned into footnotes, endnotes or will they just be links? (We convert them in our special importer a modified version of rvhtmlimport, just looking ahead again. ) Thanks !
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Internal CSS with rvhtmlimport

Post by Sergey Tkachenko »

It will use a completely different parser: no code will be borrowed from rvHtmlImporter.
The new parser will allow to register classes for processing custom tags. Although I do not plan to write a documentation for an internal structure.
In the first version, I do not plan to support footnotes (AFAIK, there are no standard ways to add them in HTML)
Post Reply