Hey @arminunruh
great! Thank you!
Hey @arminunruh
great! Thank you!
Hi @mariusjopen Marius! Thank you for the answer. I totally understand your position. Using LayGridder isn´t an option at the moment. So I had a look at the the JavaScript itself and fixed it by simply checking the type of the variable before executing the function.
tinymce.PluginManager.add('setcustomizercss', function( editor ) {
if(typeof customizerPassedData !== 'undefined') {
var css = String()
+'a{'
+'color:'+customizerPassedData.linkcolor+';'
+'border-bottom-style: solid;'
+'border-bottom-width: '+customizerPassedData.linkUnderlineStrokeWidth+'px;'
+'}'
+'body{'
+'background-color:rgb(235,235,235)!important;'
+'}';
editor.on('PreInit', function(e){
editor.contentStyles.push(css);
});
}
} );
This fixed the problem with tinymce in custom post types. And the customizer still works. Do you see any problem with this fix? If not it would be great if you could have a look at it and propably integrate it within the next update?
Thank you for your feedack!
Hello! I am getting an error in combination with the Popup Maker Plugin (https://de.wordpress.org/plugins/popup-maker/). The plugin creates a custom post type which uses the normal WP Editor (visual & text).
customizer/assets/js/tinymce_set_customizer_css.js
ReferenceError: customizerPassedData is not defined
This results in tinymce isn´t working anymore.
I had a look into customizer/customizer.php and commented out the lines 81&82. After that the editor is working correctly. Is there anyway to hook into the method and prevent to load the js for specific post types?
Thanks in advance!