Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey All,
I'm creating a document extension to change some of the CSS of a document and am running into a problem.
I can refer to images from the internet, but cannot figure out how to refer to images in my extension folder.
For example this would work:
.QvCaptionIcon.caption-icon-16x16.caption-SEARCH-dark-icon{
background-image: url(https://www.example.com/magnifier.png);
}
But the case where I want to reference an image local to the extension/server does not:
.QvCaptionIcon.caption-icon-16x16.caption-SEARCH-dark-icon{
background-image: url(mag2.png);
}
OR
.QvCaptionIcon.caption-icon-16x16.caption-SEARCH-dark-icon{
background-image: url(MyExtension/mag2.png);
}
Has anyone else run into this?
THANKS!
Sure,
You would reference them like this:
/QvAjaxZfc/QvsViewClient.aspx?public=only&type=document&name=Extensions/<ExtensionName>/<ImageName>.png
Hi Ken,
You can refer to stuff (i.e. css sheet) in your doc ext. folder like this:
var path = Qva.Remote + "?public=only&type=Document&name=Extensions/YOUR_DOC_EXT_FOLDER/";
Qva.LoadCSS(path + "style.css");
Kind regards
Jesper Bagge
Sorry, maybe I wasn't clear enough in my initial post. Your example works great in a .js file, but does not work inside the .css file, which is what I am trying to do. Any ideas how to reference images local to an extension from within the .css file?
Thanks!
Sure,
You would reference them like this:
/QvAjaxZfc/QvsViewClient.aspx?public=only&type=document&name=Extensions/<ExtensionName>/<ImageName>.png
This worked perfectly!! Thank you!