[Resolved] Table display in WP Classic editor

Home Forums Support [Resolved] Table display in WP Classic editor

Home Forums Support Table display in WP Classic editor

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #1568728
    Tom
    Lead Developer
    Lead Developer

    I’ll see if this is something we can improve in the theme itself (styling for the Classic editor isn’t easy, and isn’t something we’ve done much of, ever). However, we’re not looking at another big theme update for a few months.

    For now, your only option would be to use a child theme with a custom editor style – that way you could style the table exactly as needed in the editor.

    #1568806
    Geoff

    Tom
    You shouldn’t be working on a Saturday, have some time off! For completeness, I would add that tables display correctly in the block editor. It’s just the Classic editor that is the problem.

    #1569617
    Tom
    Lead Developer
    Lead Developer

    It’s possible that the table CSS we have here is out of date: https://github.com/tomusborne/generatepress/blob/3.0.2/assets/css/admin/editor-style.css#L30-L50

    You can try removing it on your server to see if that’s the case. If it is, we can remove it in the next GP update ๐Ÿ™‚

    #1569696
    Geoff

    Tom
    Thanks. I have looked at your link I think the problem might be that you have ‘table-layout: fixed;’. I have tried to change it to ‘table-layout: auto;’ but I cannot quite work out the additional CSS required to do this.

    #1570830
    Tom
    Lead Developer
    Lead Developer

    Can you try replacing the table CSS in there with what the theme does on the frontend?: https://github.com/tomusborne/generatepress/blob/3.0.2/assets/css/main.css#L190-L215

    Wonder if it would offer more consistent results.

    Let me know ๐Ÿ™‚

    #1573147
    Geoff

    Tom
    Thanks for the suggestion. As indicated previously, I don’t have a child theme at the moment so cannot determine if it is effective or not. However, a member of my blogging team, with far more experience of programming than I have, is considering developing one but it is unlikely to be available until sometime in the New Year (if at all).
    I assume in view of your previous comment that it is not feasible to change the ‘table-layout: fixed;’ to ‘table-layout: auto;’ by using additional CSS/PHP (the latter via the Code Snippets plugin).

    #1573385
    Tom
    Lead Developer
    Lead Developer

    Unfortunately, due to the way the Classic Editor works, it’s only possible to add CSS to it via the editor style function in a child theme.

    There’s no way that I’m aware of to add CSS to it using another method.

    #1573544
    Geoff

    Tom
    Many thanks for your time spent, and input, on this issue. I will wait to see what a child theme may bring, should there be one. In the meantime, I will mark this post as resolved and will create a new one if there is any relevant feedback.

    #1574671
    Tom
    Lead Developer
    Lead Developer

    Sounds good – thanks!

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.