Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix the TinyMCE init array #10968
No, because that breaks some of the functionality. The TinyMCE init is supposed to be written in (pure) js. It is in our (WordPress) implementation that we set it as php and then "convert" to js before output.
Several settings in the init object accept js functions. If it is JSON encoded, that breaks. Example:
Currently when using that plugin we get this in the console:
Happens because the init js is outputted by
With this pr we get:
i.e. works as expected.
Also, this pr adds another (custom) option to the TinyMCE init object:
Heh? Tests failing because... the code is more readable? :)
This seems contrary to the WP coding standards. So when defining arrays they should look like:
The spacing looks so "borked" :) How is that easy to read? :)
Opened WordPress-Coding-Standards/WordPress-Coding-Standards#1513 as follow up.