• Resolved chase.martin

    (@chasemartin)


    Add the following line to the beginning of the jQuery(document).ready(function in ps_editor.js:

    if (typeof(userSettings) == 'undefined') return {};

    This will ensure the wpCookies object is available before trying to access methods within it. After you add this line of code, the document.ready function will look as follows:

    jQuery(document).ready(function($){
            if (typeof(userSettings) == 'undefined') return {};
            var h = wpCookies.getHash('TinyMCE_content_size');
    
            if ( getUserSetting( 'editor' ) == 'html' ) {
                    if ( h )
                            $('#content').css('height', h.ch - 15 + 'px');
            } else {
                    $('#content').css('color', 'white');
                    $('#quicktags').hide();
            }
    });

    Again, this file is the ps_editor.js which is currently causing errors on the front end. The location of this file is: /wp-content/plugins/ps-disable-auto-formatting/js/280/ps_editor.js.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: PS Disable Auto Formatting] Quick FIX for js errors on front end -> inside’ is closed to new replies.