Maintain named CSS-styles throughout HTML import-export

General TRichView support forum. Please post your questions here
Post Reply
lwinter
Posts: 24
Joined: Thu Dec 01, 2005 4:42 am

Maintain named CSS-styles throughout HTML import-export

Post by lwinter »

The Problem:

How to get user-defined/custom named CSS-styles back from RV HTML export, after these named CSS-styles had been imported into RV from HTML/CSS ?
Or shorter: How to maintain custom named CSS-styles in RV?

Current Behaviour:

Importing HTML (rvhtmlimport 0.0027) with named CSS-styles/element-classes (like <span class="xyz">) works fine.
Once imported (TRichView 10.4), the content items in RV 'forget' their CSS class name. Neither RVItem nor their related styles in RVStyle 'know' about css-class/name or any such property.
Now, saving back to HTML, with options to output CSS, auto-generates non-customisable unique names (with integer increments) for each CSS-style/element-class.
The original CSS styles / class names are gone.

Questions:

1) Are you planning any amendments to make custom named CSS-styles maintainable in the near future?
2) If not, what would be a good approach to customise RV source code, in order to make the RVStyle and/or RVItem custom-CSS-styles-aware?

Best regards,
-- Lutz
Sergey Tkachenko
Site Admin
Posts: 17604
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

No, it's not planned.
It's planned to allow customizing style names that TRichView uses when saving HTML files, but reproducing the original HTML document structure is not possible. HTML may have many nested <div> and <span>, there is just no place in TRichView document model where you can store this information, because TRichView uses a very simple "flat" model: items (<span>) inside paragraphs (<p>).
Post Reply