Edirom-Online icon indicating copy to clipboard operation
Edirom-Online copied to clipboard

ability to inject custom CSS and Javascript

Open peterstadler opened this issue 3 years ago • 7 comments

IFF I understand correctly, at present only CSS (not JS) injection is possible via eXist's REST interface.

My proposal is to create an Edirom way to inject both JS and CSS, not relying on the REST interface since this should IMHO be disabled for production use. It'll need

  • a user preference setting (per edition) that will depict the path to a CSS and a JS folder in the data package
  • a function to insert every CSS (and JS) file found within those folders into the Edirom HTML
  • a Edirom controller rule to forward everything under e.g. custom-resources/$edition-id$/css to the respective collection in the data package

If this seems a viable approach I'm happy to work on this and send in a PR!

peterstadler avatar Jun 07 '22 07:06 peterstadler