jodit / jodit-angular

Angular wrapper for Jodit && Hey. Due to the fact that I do not use Angular in my projects, I cannot fix plugin errors in a timely manner. If you want the plugin to develop, send PR or better become a contributor
MIT License
48 stars 35 forks source link

Using attribute such as ngModel, required, disabled, maxlength... ? #31

Open Seiifer opened 5 years ago

Seiifer commented 5 years ago

Is there a simple way to use those attributes on the angular wrapper ? Shouldn't it be added to the component in order to be able to use them when it's calling jodit ?

Using (onChange) instead of [(ngModel)] is very heavy and I can feel the performances drop.

For now I'm using a hidden input with the proper maxlength and required attribute and a [(ngModel)] updated on the (onChange) event from the editor input. But it's getting slow, and I couldn't find a way to disable the jodit editor yet.

There must be a better solution. Any advice ?

katan commented 5 years ago

I don't understand why you require to implement those attributes inside Jodit. You must be implement it on your component controller or on a class model.

In my case, I use Reactive Forms instead ngModel and those attributes (like required, disabled ... attributes) are implement there and all runs ok.

For disable/enable the Jodit editor see the documentation: https://xdsoft.net/jodit/doc/options/disabled/

suhaskurade8 commented 4 years ago

I'm facing the same problem. Maxlength is not working in my case

MrElectroNick commented 3 years ago

Hi @Seiifer @suhaskurade8 - [(ngModel)] is now supported in latest versions of jodit-angular I'll take a look if it is possible to support [maxLength] als and if so will close this ticket with next update Cheers!

kumarbrajesh4001 commented 1 year ago

I want set required field for validation , but not working