I want to wrap my user input with double curly braces, i.e. sometext -> {{ sometext }}. I have succeeded with wrapping the input using Inputmask, but cannot make it understant curly braces literally.
here is an example with wrapping the input with %% double percentages %%:
$('#masked').inputmask({
mask: "%% a{1,20} %%"
});
https://jsfiddle.net/vm2uu4xd/
But when I try to change the mask to {{ a{1,20} }} or \{\{ a{1,20} \}\} it breaks:
TypeError: Cannot read property 'isGroup' of undefined
What is the proper format for this?
Use double backslashes:
https://jsfiddle.net/vm2uu4xd/2/
Or define a different
ecsapeCharyourself first - https://github.com/RobinHerbots/Inputmask#escapechar