Mick Davies
Mick Davies

Reputation: 66

Sitecore RTE class list not updating

I am trying to add some custom classes into the RTE for Sitecore 6.5. I have added to the ToolsFile.xml & also the default.css file which I have confirmed is displaying the correct classes in my browser. However the drop down still does not display my classes. I am running on my local machine & have tried restarting IIS, emptying my browser caches & even restarting my machine so am starting to get a little stumped.

My xml schema is as below

<root>
    <modules></modules>
    <tools></tools>
    <tools></tools>
    <tools></tools> 
    <tools></tools> 
    <links></links>
    <snippets></snippets>
    <symbols></symbols> 
    <fontNames></fontNames> 
    <fontSizes></fontSizes>
    <colors></colors>   
    <paragraphs></paragraphs>
    **<classes>
        <class name="GreenText" value=".GreenText" />
            <class name="BlueText" value=".BlueText"/>
    </classes>**
    <dialogParameters></dialogParameters>
    <languages></languages>
    <contextMenus></contextMenus>
</root>

Upvotes: 2

Views: 1894

Answers (4)

TxRegex
TxRegex

Reputation: 2425

I had the same issue. Just clear your browser cache to get the rich text editor to update with your styles. You only get one css class per style, so no bootstrap styles like "btn btn-primary"

Upvotes: 1

Mick Davies
Mick Davies

Reputation: 66

Thanks for your advice guys, it turned out to just be a caching issue & started appearing a couple of days later. It seems like the most reliable way is to add the classes then change the xml file & finally kill everything you can think of (& any you can't) that may be doing some form of caching.

Upvotes: 0

Ahmed Okour
Ahmed Okour

Reputation: 2422

If you are using chrome browser, Try making css classes lower case, like greentext, bluetext, i faced this last week, and i discovered this by chance that css class needs to be lower case. Also, try to change the name of css file in setting : To something else, like ~/RTEStyle.css, just to make sure the browser refresh the cache for css file.

Upvotes: 0

RobertoBr
RobertoBr

Reputation: 1801

You can define the css file to be used on this config setting:

<!--CSS for the RichText-->
<setting name="WebStylesheet" value="/css/richtext.css" />

All classes in this css file will be available at the RTE

Once I also had to customize the list for hyperlinks classes, if you need something similar to that take a look at this blog post. http://www.sitecoreinsight.com/how-to-define-the-list-of-css-class-in-the-apply-css-richtext-dropdown-list/

cheers.

Upvotes: 4

Related Questions