Closed Lockhild closed 2 months ago
OK, nevermind, I found the solution 😄. You simply run document.execCommand('foreColor', false, color);
I wasn't familiar with that command and though that somehow I need to be able to get the selected text and was having some problems with that, but that's not needed.
Thanks for a great library once again!
TBH, I didn't know there is a special command for changing text color :smile:
Hey! First of all, thank you for this library. I found it today and plan to replace TinyMCE in my project since it's a bit laggy when rendering inside drawers.
react-simple-wysiwyg seems to be just what I need since I really don't need a lot of features.
One feature I'm missing though is adding colors to the text and the background. I played a bit with it but didn't manage to make it work properly yet.
I was wondering, how would you implement such a feature if you would have to integrate react-colorful, for example, with react-simple-wysiwyg?
Thank you! If I land on a good solution in the meantime, I'll be back to post it here.