Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

TinyMCE Styles dropdown - converts style name to lowercase when a style is applied...


Go to End
Reply


2 Posts   983 Views

Avatar
vwd

Community Member, 160 Posts

10 November 2011 at 5:34pm

Hi,

Does anyone else experience this problem? I've added styles to typography.css. And they nicely show up in the TinyMCE editor 'styles' dropdown.

In the dropdown list itself, the case is converted to lowercase and it applies the style name lowercase.

So a discrepancy will exist with any styles that have been written in camel case (or anything other than lowercase).

Eg. typography.css

.sloganText {
    font-size: 2.3em; 
    }

In the TinyMCE dropdown, it appears as:

slogantext

When applied to content via the editor....

<p class="slogantext">My SLogan</p>

Obviously, a solution is to rename styles to lowercase. But is this a bug that should be reported? Are are some naming conventions being enforced deliberately?

Thanks.

VWD.

Avatar
figj

Community Member, 12 Posts

10 January 2015 at 2:42pm

Edited: 10/01/2015 2:47pm

Appears to be a Chrome problem - http://www.tinymce.com/develop/bugtracker_view.php?id=4149

So your choice is to either run your CMS in FireFox or use lowercase class names.

I'd recommend lowercase/hyphenated class names. Seems to be best practice these days - http://jasonbuckboyer.com/playground/use-hyphens-in-css/