Nikos M. - 2021-08-23 11:20:03 -
In reply to message 1 from Kenneth Brown
HtmlWidget needs some way to enqueue the needed assets required by some widgets, eg tinymce, codemirror,..
I have such a library ready called Importer, but htmlWidget is really agnostic regarding that, someone may use her custom enqeuer, HtmlWidget won't mind at all, as long as it can handle these things and:
1. 'scripts' type a script tag with src attribute to given asset link
2. 'styles' type a link type "text/css" tag with href to given asset link
3. 'scripts' type where asset is an array containing inline code, then script tag with the inline code
4. 'styles' type where asset is array of inline code, then a 'style' tag with the inline code
5. 'scripts-composite' is really an array of individual 'scripts' type (either link or inline)
6. 'styles-composite' is really an array of individual 'styles' type (either link or inline).
If your custom enqueer can handle these along with any dependencies they might have. It is super. HtmlWidget won't care who hanmdles it, or even whether it is handled at all.
That being said Importer is a really useful solution which can handle all that and even more and it is really light-weight.