Changing Select2 clear template


When using the “allowClear” option, I would like to replace the small “x” generated by Select2 by a FontAwesome icon (using a trash).

I managed to use CSS pseudo-elements for that when using the FontAwesome CSS framework, but I would also like it to work when using their JS+SVG framework, which would require to be able to change the generated HTML code.

Is there a way to do this (without changing Select2 code, of course…)?

Best regards,