Created
June 19, 2020 14:57
-
-
Save bgilbert6/a96cc4f87a90b23c5ae15362e4b5bf74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fieldAddedCallback(field, element) { | |
if(element.hasClass("block-emoji-pattern")) { | |
$(element).find("input").on("keypress paste input keydown", function(event) { | |
var val = $(this).val(); | |
$(this).val(val.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g, '')); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment