WYSIWYG cannot get text on change.

web
mobile

Topic: WYSIWYG cannot get text on change.

felixisaac.dev pro premium asked 3 months ago

Expected behavior Should have onChange or getValue event like MDBInput

Actual behavior Doesn't do anything, can't do anything else to get updated user text


Jakub Chmura staff premium answered 3 months ago

Hi @felixisaac.dev,

We don't have any prop to get value on the onChange event. We will discuss additional features for this plugin in the form of properties in our React team, but for now, you will need to write your own logic to receive content from WYSIWIG content.

If there is anything else I could do for you do not hesitate to ask me. I'll be happy to help you.  

Best Regards,  

Kuba


felixisaac.dev pro premium answered 3 months ago

Oh, that's okay then. When do you estimate the arrival of that prop?


Jakub Chmura staff premium commented 3 months ago

It's really hard to tell when we provide features to this plugin. For now, we have another priority. To be honest, we didn't have many reported issues with this plugin, so I think it's possible to achieve what you want without additional fixes/features from our side.

Can you tell me how much you need these changes and are you able to write your own logic to retrieve data from WYSIWIG editor?

Best, Kuba


felixisaac.dev pro premium commented 3 months ago

I already wrote my own logic.


miroslav.valev pro premium answered 3 months ago

Hello, I have a similar problem. Could you give us a simple code snippet how we should bind the editors content to the state property?


felixisaac.dev pro premium commented 3 months ago

Hi @miroslav.valev, you can write your own 'getValue' function using props under the 'textarea' component, which is what I did and worked perfectly fine.


Jakub Chmura staff premium commented 3 months ago

@miroslav.valev,

Do the same like a @felixisaac.dev, it's the best way to retrieve data from WYSIWIG for this moment.


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: React
  • MDB Version: 4.24.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No