Closed KTS915 closed 12 months ago
Agreed, something looks incorrect here, I cant even get Text widgets to work fully nor errors to show locally. I think it should be using TinyMCE if you are happy to submit a PR @KTS915
I've been trying to test the PR #275 for this and couldn't get things working locally at all, until I reverted the changes we made in #240 - reversing that entire commit popped the TinyMCE editor back into existence for me on Text Widgets.
Does that help in figuring this issue out? Is it worth reverting #240 and re-working that PR again? Would accept your suggestion here.
I've just made one more change to PR #275. It seems that the previous changes have made everything so much quicker that it was just happening too fast for TinyMCE! So I have increased the delay before it goes to work from 50ms to 200ms. (I tried 100ms and it was inconsistent as to whether that was enough, so 200 seems safe). I think we should be good now.
Expected behavior
Is TinyMCE supposed to be working in the Text widget? I don't use it normally but, as I'm working on something to do with widgets, I had cause to test it and found that Tiny doesn't work. (In fact, there's an error generated in the browser console.)
Current behavior
When opening a Text widget, the user can enter blank text only. There is no TinyMCE editor.
Possible solution
What's missing are some lines in the
~/wp-includes/script-loader.php
file and then some lines in the~wp-admin/js/widgets/text-widgets.js
file.I can provide a PR if we agree that Tiny is supposed to be working (which I think is what we want). If we don't want that, then some lines need removing from the
~wp-admin/js/widgets/text-widgets.js
file to avoid generating the current error.Steps to reproduce bug
Open a Text widget and see for yourself.
Context
No response
ClassicPress version
2.0.0+nightly.20231005
PHP version
8.1
Can you help?
Yes, I will submit a PR