Insert Placeholder that contains HTML



Just started using Select2 and am trying to solve for something that the designer gave us. Normally I would do something like this:
But that does not work with the way the PLACEHOLDER function works.

Can’t post more than one image, so will continue in reply if I can.


Continuing with next description and image:

If I try to do this:
Then it does swap in the text, but it does not escape the text.

to be continued…


… continued:

This means I end up with something that looks like this:

What is the best way to approach this?



This documentation explains how to style the placeholder: Note that you have to do this in JavaScript; you can’t do it with the data-placeholder attribute.