Preserving classes as styles when opening HTML documents.

asked 2015-12-12 01:07:25 +0100

mcglk gravatar image

I note that when opening an HTML document, none of the classes are preserved. Headers and paragraphs are respected, and basic formatting (em, i, strong, b, etc.), but classes are entirely lost, and div and span information are entirely lost.

In the case of

<div class="booga">
    <p class="fleen">something something</p>
</div>

I'd like LibreOffice to define two paragraph styles, "booga" and "booga-fleen". It doesn't matter to me if the formatting is preserved—I'm happy to modify the styles after the file's been opened.

Similarly, in the case of:

<p class="shout">H<span class="smallcaps">ow are you</span>?</p>

I'd like both the paragraph style "shout" to be defined, and a character style "smallcaps" to be defined.

Similar definitions would be in play for tables and other structures.

It would be even better if I could import/export style information so that I could open up a new version of the HTML file and then import all the style-formatting information.

Is this too difficult of a request?

edit retag flag offensive close merge delete