Topic: WYSIWYG cannot get text on change.
felixisaac.dev asked 5 years 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 5 years 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 answered 5 years ago
Oh, that's okay then. When do you estimate the arrival of that prop?
Jakub Chmura staff premium commented 5 years 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 commented 5 years ago
I already wrote my own logic.
miroslav.valev answered 5 years 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 commented 5 years 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 5 years ago
Do the same like a @felixisaac.dev, it's the best way to retrieve data from WYSIWIG for this moment.
Otto commented 4 years ago
Would you be so kind to show us the function. Thank you in advance.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.24.0
- Device: Desktop
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No