I’ve had an issue for a little while where the wordpress visual editor button stopped working. The code editor was fine, and the button for the visual editor is present but clicking on it has no effect. After much fiddling around I finally discovered it was being broken by my Content Security Policy!
One reason this was so difficult to diagnose is because I haven’t seen anyone else suggest CSP as the source of the problem, especially since I am using the “classic editor” plugin which most people seem to blame. The plugin, or wordpress itself, may be partly to blame as my CSP isn’t unreasonable, but clearly I needed to permit something else.
When I finally started digging through the console I found the following error (in Firefox): The page’s settings observed the loading of a resource at eval (“script-src”)
So to get this working I will have to enable “unsafe-eval” which is annoying because this makes a content security policy largely pointless.
As more and more people implement CSP this will become more of an issue for the wordpress and plugin devs to resolve to hopefully in the longer term solutions will become available. Until then I will see if there is a workaround by removing inline and eval code.
The best information and guide I have found so far is at Color Blind Programming
اس مفید پایا? ہمیں بتائیں کرتے ہیں براہ مہربانی ذیل میں ایک تبصرہ چھوڑنے کے. آپ کے سبسکرائب کرنا چاہتے ہیں تو سب سے اوپر دائیں مینو پر لنک سبسکرائب استعمال کریں. آپ بھی ذیل سماجی روابط کا استعمال کرتے ہوئے کی طرف سے اپنے دوستوں کے ساتھ اس کا اشتراک کر سکتے ہیں. چیرس.