DISCONTINUED: This has been discontinued in favour of this react component based off of this. This can still be used, but it is unsupported.
Character Map selector for UTF8 special characters.
Ultimately, styling is up to you, this only includes the most basic of styles for the demo.
The script is library agnostic (vanilla javascript), the decision was made to not minify or compile the script, as this should be done on build of your entire app. This allows for custom debugging and compiling procedures.
<script src="charMap.js"></script>
<link rel="stylesheet" href="charMap.css" >
<script>
charMap.init({
target: "#character-map", // Element or Selector
onLoad: function() {
console.log("Character map loaded");
},
onClick: function(char){
// User has clicked a character, so do what you need
console.log("The character is; " + char);
}
});
</script>
if you notice something missing from the character list, feel free to raise a pull request with updates, or fork it and make it even better :)