• Resolved tuftz

    (@tuftz)


    When I try to type in the wysiwyg editor for either a post or a page individual letters form on the left hand side of the page (example below). This does not occur when typing in Text mode BUT when I change back to Visual mode, they all line up in a vertical column on the left as follows:

    t
    h
    i
    s
    i
    a
    n
    e
    x
    a
    m
    p
    l
    e

    I have tried ALL of the suggested initial steps, turning off plugins, etc. to no avail.

    Please help.

    Larry Johnson

Viewing 15 replies - 1 through 15 (of 21 total)
  • What theme are you using? Where did you download it from? https://codex.www.ads-software.com/Forum_Welcome#Include_as_Much_Information_as_Possible

    Thread Starter tuftz

    (@tuftz)

    Theme is the Graphene theme version 1.9.4.2 downloaded from WP – I have this identical theme set on 71 other sites which I support/maintain with no problems like this.

    It’s got to be something particular to that one WP install. Use the developer tools in Firefox (or Firebug) or Chrome or Safari or IE to look at the CSS for the narrow column and see if it is a column CSS width or if paragraph breaks are being added.

    Thread Starter tuftz

    (@tuftz)

    Mark,

    What you suggest sounds reasonable and I agree that this is something particular to this install. However, this exact error showed up several months ago in another site which I subsequently deleted and totally rebuilt. That site was housed on a server which I no longer use and this site is also from that server. Also, unfortunately, you are above my expertise in looking at and understanding the CSS.
    So:
    1) How do I do this;
    2) What am I looking for in the CSS.

    I really want to get to the bottom of this problem so that in the future IF it shows up again I will know what to do.

    Larry Johnson

    Thread Starter tuftz

    (@tuftz)

    Mark,

    Is there a way to re-install the wysiwyg editor ONLY in WP. IF so perhaps that would overwrite the error and solve the problem.

    Larry

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Reinstalling something doesn’t magically fix things. You need to look at the editor with an inspector and try to find where the rogue css is coming from. This will likely tell you the source of the problem, and then you will be able to find out what changed.

    Thread Starter tuftz

    (@tuftz)

    Thanks for the reply Otto.

    When you say “inspector” are you referring to the tool under the developer section of firefox?

    Larry

    Thread Starter tuftz

    (@tuftz)

    Ok, I have the “inspector” working now what am I looking for? How do I spot “rogue css”?

    Inspect the div that contains the text that’s in the narrow column. There is a learning curve to developer tools, but basically, they are indispensable for modern web development. There are many videos on YouTube.

    Thread Starter tuftz

    (@tuftz)

    Well, I can make no sense out of this ‘inspector’ and everything I try does not work. This seems to be beyond my rather limited technical abilities. I do appreciate the advice.

    I have seen several other posts in other areas regarding this problem so I am not the only one affected by it. However, I have found no solutions to this short of completely deleting the website and rebuilding it from scratch.

    I find it impossible to accept that no one has found a solution to this. I would humbly suggest that someone highly versed in WP needs to figure this out and post it to this forum so that the rest of us can get on with our lives. Obviously, I am not the one to do this.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Email me about the problem. If I can see it on my browser, I can probably tell you where the issue is.

    My email is otto at wordpress dot org.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Okay, well, after looking at a site with the problem, I have not figured out the underlying cause yet, but one temporary fix would be to add this to your theme’s custom CSS rules:

    .mce-content-body {
        width: auto !important;
    }

    For some reason, the TinyMCE body is getting a width:0px style applied to it. Can’t see anything in the JS that would cause that, still looking. However, using that rule above will force that area to be the right width.

    This isn’t a “fix”, just a workaround. Temporary.

    Thread Starter tuftz

    (@tuftz)

    Thank you for the effort and for the “work around” Now, where do I put it? I can find no file .mce-content-body and no item labeled custom CSS rules for the graphene theme.

    Larry

    The fix is a little funky to do, since we need to add CSS to the admin area and not the viewer end of the theme. If it was the viewer side of the site, we could use a simple plugin to add the CSS.

    Ideallly, you need to make a child theme of Graphene, and then add a function to add the CSS fix to the admin area. That way, the fix stays in place when you upgrade Graphene. See https://codex.www.ads-software.com/Child_Themes on how to make a child theme.

    Then, add this to the functions.php file of the child theme:

    function add_css_fix_to_backend() {
    	echo '<style type="text/css">.mce-content-body {width: auto !important;}</style>';
    }
    add_action('admin_head', 'add_css_fix_to_backend');

    That function adds the CSS fix to the admin backend.

    You can – but it’s not a good idea – simply add that function to the Graphene theme right now, without making a child theme; but if you update the theme, it will get erased.

    Use FTP to make a child theme and edit files; don’t use the WordPress editor. See Filezilla and FTP Clients ? WordPress Codex.

    Or, you can make a very simple plugin that will apply the CSS fix without needing to make a child theme or modify the theme folder.

    Add the code below to a text file and call it something like css-fix.php, and then put it in your plugins folder with FTP and activate it:

    <?php
    
    /*
    Plugin Name: Add CSS Fix to Admin
    Description: This plugin adds the TinyMCE CSS fix
    Version: 1.0
    License: GPL
    Author: WordPress
    Author URI: www.ads-software.com
    */
    
    function add_css_fix_to_backend() {
    	echo '<style type="text/css">.mce-content-body {width: auto !important;}</style>';
    }
    add_action('admin_head', 'add_css_fix_to_backend');
Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘wysiwyg Editor Misbehaving – AGAIN’ is closed to new replies.