Page 1 of 1

Possible to Target File Browser Elements in Plugin?

Posted: Wed Sep 20, 2023 9:12 pm
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

Re: Possible to Target File Browser Elements in Plugin?

Posted: Thu Sep 21, 2023 11:37 am
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

Re: Possible to Target File Browser Elements in Plugin?

Posted: Fri Sep 22, 2023 3:05 am
by dreifsnider
Hi Cosmin,

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

Best,
Daniel