Sublime Forum

How to implements such clickable icons in popup?





In that case, these are unicode characters. <a href="revert">⟲</a>

1 Like


Icons are just strings ? or some special symbols ?
“revert” is special case which need to handle, isn’t it ? or any predefined functionality ?



As mentioned, the character in the link is just a unicode character; there’s nothing special about it. If you want to use it, you can copy it out of the message above and paste it into your own code if you want.

The revert is also nothing special. Links in popups can have an href attribute, and when they’re clicked the handler that is called (which you apply when you open the popup as in your other thread asking similar questions) gets the content of the href so that it knows what to do.

It’s probably a good idea to use an href value that makes sense so that when you look at your code you know what it’s doing, but it could just as easily be <a href="flibbertyjibbet">⟲</a> so long as the handler knows that it should do something special when flibbertyjibbet is the value it gets called with.

1 Like


You can stick an <img> inside an <a> tag so something like <a href="navigation-id"><img src="..."></a>