Possible to Target File Browser Elements in Plugin?

Are you missing a feature? Request its implementation here.
dreifsnider
Posts: 171
Joined: Thu Aug 30, 2018 10:06 pm

Possible to Target File Browser Elements in Plugin?

Post by dreifsnider »

Hi,

My team would like to modify the file icons that display for files in the file browser and on the dashboard.

For example, we specifically want to better distinguish between ditamaps and dita files like so:
web-author-file-browser-file-type-icons.png
I am able to accomplish this using the following JS code (with jQuery) in Chrome's console; however, I haven't been able to accomplish this by adding this code to a plugin:

Code: Select all

$.expr[':'].textEquals = $.expr[':'].textEquals || $.expr.createPseudo(function(arg) {
            return function(elem) {
                return $(elem).text().match(arg + "$");
            };
        });
var ditamapEntry = $('.file-browser-entry.file:textEquals("ditamap")');
var ditaEntry = $('.file-browser-entry.file:textEquals("dita")');
ditamapEntry.css({"display": "inherit", "background-image": "url('../rest/v25.1.0/load/image/?url=%252Fimages%252FDitaMapRoot16.png')"});
ditaEntry.css({"display": "inherit", "background-image": "url('../rest/v25.1.0/load/image/2?url=%25406%25252Fdita%25252Fditamap.framework%25252FDITA%252520Map%252Fimg%252FTopic16.png')"});
Is it possible to do this with a plugin so that all web Author users see this change?

Thanks,

Daniel
You do not have the required permissions to view the files attached to this post.
cosminef
Site Admin
Posts: 233
Joined: Wed Aug 30, 2023 2:33 pm

Re: Possible to Target File Browser Elements in Plugin?

Post by cosminef »

Hello,
This is not possible to do with a plugin, because our API does not support this.
We have registered an internal issue and we will post here on the forum when we make those changes.

Best Regards,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
dreifsnider
Posts: 171
Joined: Thu Aug 30, 2018 10:06 pm

Re: Possible to Target File Browser Elements in Plugin?

Post by dreifsnider »

Hi Cosmin,

Thank you for your reply and for registering an internal issue for this.

Best,
Daniel
Post Reply