Insert a money mascara plugin

Insert a money mascara plugin

klermannklermann 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();

plentz.github.io/jquery-maskmoney/

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Creating a field type plug-in is the correct way to do this.

    Allan

  • klermannklermann Posts: 277Questions: 67Answers: 1

    But is it possible to insert the plugin I quoted above in the create of this editor plugin?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    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

  • klermannklermann Posts: 277Questions: 67Answers: 1

    Can you guide me, please, what to do?

  • klermannklermann Posts: 277Questions: 67Answers: 1

    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?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    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

This discussion has been closed.