Page 1 of 1

HTML output with embedded CSS

Posted: Fri Aug 24, 2018 5:20 pm
by kgajda
Hi :)

I have a requirement to take a single topic file and transform it to a single htm file. There won't be any images, except the logo which I was going to add to its header with Base64 encoding. Now I need to move the CSS from the external file to embedded or inline... This is a topic that we use in our larger webhelp projects, so I do not want to do anything to it that will mess those projects up, just looking for something I can do with a transform or building a plugin and looking to see if this is possible and the general idea of how. Specifics are good, too :)

Thanks so much for all of your help! I always get great answers here!
Kim

Re: HTML output with embedded CSS

Posted: Mon Aug 27, 2018 11:12 am
by Costin
Hello,

You could open the DITA topic in the editor and use one of the default transformation scenarios - DITA XHTML or DITA HTML 5, available in the scenarios list from menu Document > Transformation > Configure Transformation Scenario(s), or by using the related action from the toolbar.

Regards,
Costin

Re: HTML output with embedded CSS

Posted: Mon Aug 27, 2018 5:00 pm
by kgajda
Thanks for the reply, Costin. I do know how to just get the single topic transformed vs the whole map. The problem here is that I need the output to be one single file. So if do an HTML5 transform, I get css files, too. I was wondering if there a way to get some inline or embedded css. So that my output is just the one standalone file?

Re: HTML output with embedded CSS

Posted: Mon Sep 03, 2018 11:34 am
by bogdan_cercelaru
Hello,

Unfortunately, there is no transformation scenario that generates a single HTML file, without references to external files (CSS, JS or images).

Regards,
Bogdan