Url of builtin image from custom css

Post here questions and problems related to oXygen frameworks/document types.
Patrik
Posts: 227
Location: Hamburg/Germany

Url of builtin image from custom css

Mon Oct 26, 2015 1:12 pm

Hi,

within my custom css files I'd liketo be able to refer to some builtin images like 'editContent.gif'. But I can't know where the custom framework will be located relative to the oxygen folder so I can't use a relative path. Is there any way to use something like url('${OXYGEN_INSTALL}/lib/oxygen.jar/images/editContent.gif')?

If not, would it be ok to just copy the required images to an image folder in my custom framework? It will be shared as open source.

Patrik
Radu
Posts: 5505

Re: Url of builtin image from custom css

Mon Oct 26, 2015 1:25 pm

Hi Patrik,

You can try in the CSS's an URL which starts with "/" like:

Code: Select all

 url('/images/editContent.gif')


That should force the image to be resolved to the main Oxygen JAR.
But we do not consider that these image file names are API so at some point in the future we might change the file names, for example save the image as PNG instead of ".gif".
So maybe it would be better if you would copy that image from the JAR to your framework and refer to it directly.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Patrik
Posts: 227
Location: Hamburg/Germany

Re: Url of builtin image from custom css

Mon Oct 26, 2015 1:32 pm

Hi Radu,

thanks for the quick answer. Using an URL starting with '/'did not work. He was looking fot the file 'C:/images/editContent.gif'. So I copied the required images into my framework. (Just wasn't sure if there are any copyright issues with your images.)

Patrik
Radu
Posts: 5505

Re: Url of builtin image from custom css

Mon Oct 26, 2015 1:39 pm

Hi Patrik,

As long as you are using the image with an Oxygen framework there are not copyright issues.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest