Copied to clipboard

Flag this post as spam?

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


  • Damon Bauer 48 posts 95 karma points
    May 09, 2013 @ 17:31
    Damon Bauer
    0

    Rich Text Editor - Adding Styles & Sub Styles

    I'm trying to get some styles added to a rich text editor. I followed the wiki and I'm able to add a heading (h1) - great, no problem.

    I'm having an issue now trying to add "h1 span" - so a heading with text that's wrapped inside a span which will make that text smaller with some CSS.

    It seems like since the h1 has a dropdown style applied to it, I can't select just part of the text and add a new "sub style (my span)".

    Has anyone been able to successfully implement this? Am I missing something obvious?

    My "heading" property is just "h1" with some styles. My "sub heading" property is "h1 span".

  • Amir Khan 1284 posts 2741 karma points
    May 09, 2013 @ 20:59
    Amir Khan
    0

    Whenever we do this, we create two text fields instead of using the RTE, one called "Main Heading Bold" and another called "Main Heading Light" then we do something like below in the template to insert the span only if the light heading has a value:

    <h1><umbraco:Item field="mainHeadingBold" runat="server" /><umbraco:Item field="mainHeadingLight" insertTextBefore="&lt;span&gt;" insertTextAfter="&lt;/span&gt;" runat="server" /></h1>
  • Damon Bauer 48 posts 95 karma points
    May 13, 2013 @ 15:04
    Damon Bauer
    0

    Amir:

    Thanks for the comment. That makes a lot of sense. Unfortunately, the design I'm trying to build has the span(s) in a "random" order. For example, a heading might be:

    It seems as though if I apply the Heading style to the whole piece of text, I can't highlight specific words inside of that and apply a different style.

    Any tips for this kind of setup?

Please Sign in or register to post replies

Write your reply to:

Draft