Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik 777 posts 3092 karma points MVP c-trib
    Feb 14, 2018 @ 15:53
    Nik
    0

    TinyMCE (RTE) in Umbraco 7.8.1 doesn't size correctly in the Grid

    Hi all,

    I'm having a really odd issue with TinyMCE, but I can't seem to fully identify the source of the problem.

    In a test upgrade of a site I took it from version 7.7.2 to 7.8.1. As expected I had the initial issue where the RTE would render as experienced in this thread here: https://our.umbraco.org/forum/using-umbraco-and-getting-started/90448-rte-is-dead-in-v78

    Forcing the browser to clear the cache resolved that issue but I was left with a new one.

    My RTE's don't always render the correct size height wise and in-turn they don't auto-grow when additional content is added.

    For example One RTE has an entry roughly this long:

    Proin faucibus arcu quis ante. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Sed augue ipsum, egestas nec, vestibulum et, malesuada adipiscing, dui. Donec posuere vulputate arcu. Donec vitae sapien ut libero venenatis faucibus.

    In the RTE on my screen it wraps onto 2 lines with approximately the last 8 words on the second line. In the Upgraded RTE, the height of the RTE only just show the tops of characters on the second line.

    In order to access this line for editing you have to click in the RTE then move down with the cursor.

    Initial Render of RTE After focus and cursor down once After adding more text and de-focusing

    Was wondering if anyone had any ideas.

  • Nigel Wilson 851 posts 1822 karma points
    Feb 14, 2018 @ 17:59
    Nigel Wilson
    1

    Hey Nik

    A bit frustrating huh...

    Wondering if creating a css file and associating it with the RTE, and then within the CSS file try overriding height / margin properties to see if it will behave ? Would take a bit of code inspection to try and track down what to change, but it might solve the issue.

    Cheers

    Nigel

  • Nik 777 posts 3092 karma points MVP c-trib
    Feb 14, 2018 @ 18:25
    Nik
    0

    Yeah, It's really frustrating to try and diagnose this sort of thing. Had to do it before on another project but then I had a starting point as it was caused by a custom style sheet.

    I'll give adding a custom style sheet to it and seeing what I can do. I've never managed to get my head around how Tiny MCE figure out heights so I guess it will be some trial and error.

  • Nik 777 posts 3092 karma points MVP c-trib
    Feb 15, 2018 @ 09:42
    Nik
    100

    For those that end up with a similar problem, I found the cause (although I don't know why).

    In the TinyMCE that ships with 7.8.1 if you have a style such as this:

    body{
        margin: 0;
    }
    

    it will break how TinyMCE calculates it's height. This style had slipped into the style sheet for the RTE, however it didn't cause any issues in earlier versions.

    Removing this style resolves the issue that was being displayed.

Please Sign in or register to post replies

Write your reply to:

Draft