Insert a money mascara plugin
Insert a money mascara plugin
klermann
Posts: 277Questions: 67Answers: 1
Hello! How do I insert a money mascara plugin into my field in the editor. I am trying to insert and the field does not appear or does not accept the mask of this plugin. Help!
The mask does not give the option to put the coin symbol before the value!
$("#receitaValor").maskMoney();
This discussion has been closed.
Answers
Creating a field type plug-in is the correct way to do this.
Allan
But is it possible to insert the plugin I quoted above in the create of this editor plugin?
Yes - as I said the correct way to do that would be to create a field type plug-in for it. That is basically a plug-in for Editor which will let it see and use that library (so you could do something like
type: 'maskMoney'
in your Editor initialisation for that field.Allan
Can you guide me, please, what to do?
How do I call the maskMoney () library inside the plugin so I can use it? If this is how it can be done, how do I call one function within another normally?
The documentation I linked to above provides full details of how to create a plug-in for Editor. If you'd like me to write it for you, this is something that would be covered by the support options.
You might also be interested to take a look at the existing plug-ins so you can see how they operate. In particular, look at the Mask plug-in as that is very similar to the one you will need.
Regards,
Allan