WordPress.org

Ready to get started?Download WordPress

Forums

PS Disable Auto Formatting
[resolved] Quick FIX for js errors on front end -> inside (3 posts)

  1. chase.martin
    Member
    Posted 3 years ago #

    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.

  2. Ingenius Dastard
    Member
    Posted 3 years ago #

    Wow! You posted this 5 hours ago and it showed up on Google.

    I will use this. Plugin owner should update because this is causing errors on IE6 and crew.

  3. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    Empty Paragraph for TinyMCE Editor
    http://wordpress.org/extend/plugins/empty-paragraph-for-tinymce-editor/

    Is an alternative to this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic