+1-888-365-2779
Try Now
More in this section

Forums / Designing & Styling / Rich text editor configuration CSS class issue

Rich text editor configuration CSS class issue

4 posts, 0 answered
  1. Ricardo
    Ricardo avatar
    29 posts
    Registered:
    06 Nov 2012
    26 Feb 2013
    Link to this post

    Hi,

    Having some issues regarding the text editor configuration. How can I add the yellow button to it as per my current CSS?

    My CSS is the following:

    .button {
        border: 1px solid #d5d5d5;
        border-radius: .5em;
        -webkit-box-shadow: 0 0 .5em 0 rgba(0, 0, 0, .05);
        -moz-box-shadow: 0 0 .5em 0 rgba(0, 0, 0, .05);
        box-shadow: 0 0 .5em 0 rgba(0, 0, 0, .05);
    color: #004FB6;
        cursor: pointer;
        display: inline-block;
        font-weight: bold;
        padding: .7em 2.5em .7em .7em;
        text-decoration: none;
    }
    .button:hover {
        text-decoration: none;
    }
    .button.yellow {
        background-color: #ffd900;
        border-color: #e2bd43;
    }

    <classes>
    <class name="Button" value=".button" />
    <class name="ButtonYellow" value=".button .yellow" /></classes>

    ...

    </classes>

    I would prefer not to have to create each colour differently.

    Any ideas?

    Thanks, R

  2. Ricardo
    Ricardo avatar
    29 posts
    Registered:
    06 Nov 2012
    26 Feb 2013
    Link to this post

    The issue is that I the class does not render correctly. The 'button' works fine but when I want to add a Yellow button it does not work. Any thoughts highly appreciated.

  3. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    27 Feb 2013 in reply to Ricardo
    Link to this post

    Ricardo,

    Try removing the space between ".button .yellow" in your toolbox entry.  I know that in html you would be writing it as class="button yellow", but the RadEditor is going to look for an exact match on the context that you enter.

  4. Ricardo
    Ricardo avatar
    29 posts
    Registered:
    06 Nov 2012
    28 Feb 2013 in reply to Stacey
    Link to this post

    Thanks! Unfortunately it does not solve my issue, the only difference is that I do get the last class through on the apply class dropdownlist, but not the first.

    Also, how can I style a list? That one also does not show on the dropdownlist, but it is only one class. I cannot ask the business department to switch to html and add the CSS class name manually, they would struggle and could mess it up. There should be more comprehensive examples for real world scenarios of this. Think this post should be a start for it. Let me know if you know of any.

    In the meantime going to rewrite all the classes on my CSS to be separate, although it still leaves me with wrappers and list classes unresolved.

    Tks,

    Ricardo

4 posts, 0 answered