Image classes?

kgajda
Posts: 25
Joined: Wed Aug 16, 2017 8:07 pm

Image classes?

Post by kgajda » Wed Jan 03, 2018 6:46 pm

Does oxygen give you enough flexibility to apply individual class tags to images? ie: <img src="something.png" class="unity-img"> so that I can create a class for css styling for some images but not others?
Thanks!
Kim

bogdan_cercelaru
Posts: 211
Joined: Tue Jul 01, 2014 11:48 am

Re: Image classes?

Post by bogdan_cercelaru » Thu Jan 04, 2018 12:54 pm

Hello,

Yes, you can obtain a custom CSS class in the generated output using the @outputclass attribute in the DITA topic. The value of this attribute will be found in the resulted @class attribute in the output.
For example, if your DITA topic contains

Code: Select all

<image href="path/to/image" outputclass="mystyle"/>
the resulted output contains

Code: Select all

<img class="image mystyle" src="path/to/image"/>
Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply