Open archoda opened 2 months ago
Hey @archoda,
Thanks for writing this up, unfortunately we're becoming very limited in what we can do with TinyMCE in the block editor - it's why we now warn users to avoid using the WYSIWYG field in blocks.
Most new WordPress versions add more custom event handlers which is interrupting how TinyMCE performs, and as a legacy library we expect these issues to get worse over the coming years.
You should be able to handle things like this by triggering a change event on any input in your block form, however. ACF Blocks currently listens for that to trigger the serialisation, and we expect that to continue through our rewrites.
We recommend users use <InnerBlocks />
to use the WordPress block editor native tools for WYSIWYG like content. You can restriction the blocks allowed inside with allowedBlocks
to only allow paragraphs and images for example.
We will still take a look at your issue to see if there's anything we can do specifically in your case; but it will likely need you to fire the change event I think.
Describe the bug The ACF Block content doesn't update when i add custom WYSIWYG buttons. There's also no console errors.
Ive tried this the WYSIWYG editor on delayed initialization and default.
When I add the code below to trigger on the front-end, the 'Text' tab code view shows the correct HTML updates, but the 'Visual' tab and the WP Block HTML ( rendered and code editor view ) are not.
Caveat** If i tab over to the 'Text' view and manually change the content or even just a hard return, the editor and WP Block update and render properly.
To Reproduce Steps to reproduce the behavior:
Expected behavior Expect that clicking on any of the custom buttons in the ACF fields in page or block will update the WP Gutenberg Block render template live like normal.
Screenshots or Video ...
Code
Version Information:
Additional context