Copied to clipboard

Flag this post as spam?

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


  • James 251 posts 1169 karma points
    Jul 17, 2014 @ 22:59
    James
    0

    Rich Text Editor Formats

    When I go to add content through a rich text editor and i click format. I see no text formats int he drop down.

    How do i go about adding H1/H2/H3/Paragraph styles to my rich text editor?

     

    Kind regards.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 17, 2014 @ 23:25
    Dennis Aaen
    102

    Hi James,

    Here is a video on Umbraco TV that shows how you can setup styles for the richtext editor.

    http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/stylesheets-and-javascript/setting-up-rte-styles/

    /Dennis

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 19, 2014 @ 10:11
    Dennis Aaen
    1

    Hi James,

    Did you managed to add styles to the rich text editor by following the instructions from the video?

    Looking forward to hear from you.

    /Dennis

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 21, 2014 @ 10:13
    Dennis Aaen
    1

    Hi James,

    I don´t know if you have seen that I have written an answer, but I hope you managed to get styles into rich text editor following the instructions from the video

    /Dennis

  • James 251 posts 1169 karma points
    Jul 21, 2014 @ 11:58
    James
    0

    Thansk very much for your reply. Yes the links you provided did work. Thanks for your input :)

  • IanS 22 posts 65 karma points
    Nov 01, 2016 @ 09:48
    IanS
    2

    Just posting this to help anyone who has watched the video and found that those instructions don't work any more:

    The video is correct except for the part where you assign the style to the rich text editor. Umbraco now seems to create a unique 'rich text editor' data type for every instance of the rich text editor used throughout your site.

    For example, lets say you have a document type called 'Tutorials' and on that page you have a rich text editor called 'Summary'. Now, Umbraco will automatically create a new data type called "Tutorials - Summary - Rich text editor' and it is on this data type that you must assign the styles, not on the generic rich text editor as you used to do on previous versions of umbraco and in the video.

    Took me half a day to figure out this (presumably undocumented) change so hopefully it'll help somebody.

    NB. I'm using v7.5.4. No idea when this change happened.

  • Kitty 8 posts 98 karma points
    Jun 28, 2017 @ 10:30
    Kitty
    0

    Thank you so much Ian! Would never have realised that :D

  • Francielle 65 posts 279 karma points
    Aug 23, 2017 @ 20:15
    Francielle
    0

    Thanks! Was gonna give up before finding your answer.

  • Harry Spyrou 212 posts 604 karma points
    Feb 15, 2018 @ 15:36
    Harry Spyrou
    0

    I would start a new thread but I think this one will work.

    I'm following the instructions, relating the stylesheet to the specific rich text editor that I have and I find it very buggy.

    The classes are created in the final html, but the actual css is not. So I have classes but not styles. I found a workaround, but this is very confusing for me and the client.

    I'm working in Umbraco 7.7. The rich text editor is within Nested Content, I don't know if that helps.

  • McGern 13 posts 44 karma points
    Feb 12, 2020 @ 11:59
    McGern
    0

    I don't think this is a bug. The stylesheets in umbraco can be used in a couple of ways:-

    • Create a stylesheet that can be used in the website
    • Create "formats" that can be used in the rich text editor RTE (just css rules)
    • A combination of both

    In all cases, there is a file path provided to the css file that can be used to insert a link to the stylesheet in your templates. This won't happen automatically.

    RTE shouldn't really be considered a WYSIWYG web editor since the complexity of a webpage can't be captured in an RTE. In the instance when you want to create formats for the RTE, I usually create very simple styling that serves two purposes:- * To allow the user to change the format of text from rules in the dropdown * To give the user some simple visual feedback that the rule is going to be applied, but doesn't need to exactly match the rule.

    So I have a rule for an introduction paragraph that applies a class and the styling to the RTE

    .intro {font-size:larger;}

    Then I have the real (more complex) rule in my css (which is generated from scss, so can't be held in umbraco) which might be something like this

    .intro { font-size: 2rem; font-family: Georgia; letter-spacing: 1px; }

    If you want like-for-like RTE styles to web site styles, then adding a link to the umbraco stylesheet in your template will accomplish that. Umbraco won't automatically insert the stylesheet for each rich-text instance you have on the page.

Please Sign in or register to post replies

Write your reply to:

Draft