Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Oct 15, 2011 @ 23:31
    Craig100
    0

    How do you make RTE content look the same as the live content?

    Hi,

    Just watched Doug's video here: http://umbracoukfestival.co.uk/video-and-pics/ where he appears to say that you can get the content in the RTE to look the same as the live content. I found the vid very useful and have created 3 RTE's of the right size and have added some styles to the style dropdown. However, I can't get the <p> font size right without it changing the live content font size.  Is there an accepted way to do this or is it something we just live with because it's near enough (which it is actually, but my client's fussy, lol)?

    Craig

  • Rodion Novoselov 694 posts 859 karma points
    Oct 15, 2011 @ 23:57
    Rodion Novoselov
    0

    Hi. Some days ago I found (a bit occasionally) the trick that then I used and it perhaps can be usefull. If you take a look at how RTE is rendered in backoffice you'll find that actually it's an iframe and html rendered inside this iframe includes a reference to several css files:

    The most ineteresting one here is /umbraco_client/tinymce3/themes/umbraco/skins/umbraco/content.css - this one contains the very styles that are used to styling the html rendered inside RTE. 

    So, I realised  that it's possible to do several steps:
    1) clean the contents of this file;
    2) create some css file in the /css folder, say 'tinymce.css';
    3) include the latter file in both 'content.css' (by an @import statement) and to the site templates (referencing it directly with a <link> tag or in css by @import)

    After that any style placed to the 'tinymce.css' file will be applyed to both the live site and RTE.

  • Craig100 1136 posts 2523 karma points c-trib
    Oct 19, 2011 @ 11:28
    Craig100
    0

    So it's not as the Umbraco documentation says then? Maybe the documentation should be updated or the RTE system should be updated to work properly.  ATM I have added styles that look awful in the RTE but correct in the main site. It's a BIG selling point for Umbraco that this should work properly. I really don't know what to do for the best.

    Craig

  • Craig100 1136 posts 2523 karma points c-trib
    Jan 09, 2013 @ 18:06
    Craig100
    0

    In a UMB 4.7.0 site I have a style sheet attached to my RTE.  I have a simple style thus:-

    .smalltext {font-size:0.8em;color:red;}

    When applied to a word in the RTE, nothing happens visually there. The style is applied as a span which can be seen in the html view and it is correctly applied to the actual page on the live site. However, I need it to show up in the RTE or the client will think I've gone mental.   I've tried adding the style to /umbraco_client/tinymce3/themes/umbraco/skins/umbraco/content.css stylesheet but that makes no difference. I'm at my wits end.

    Any clues would be appreciated.

    Craig

     

  • Amir Khan 1287 posts 2744 karma points
    Jan 10, 2013 @ 02:09
    Amir Khan
    0

    Did you associate a stylesheet with the smalltext class in it with the RTE in the Developer section of the Umbraco backend?

  • Craig100 1136 posts 2523 karma points c-trib
    Jan 10, 2013 @ 08:59
    Craig100
    0

    Yes I did, that's why it all works great apart from it visually affecting the style in the RTE itself. If you look at the HTML view, a span is added with the class around the intended target. The live page is affected correctly but the look of the target in the RTE is unchanged.

Please Sign in or register to post replies

Write your reply to:

Draft