Custom CSS in Text Editor

Vote:
 

There seems to be a problem with using custom CSS in the TinyMCE editor in EPiServer 6 R2.

For the life of me I cannot get the editor to reference my stylesheet.

I have tried the following three approaches:

1. Create a dynamic property called UIEditorCSSPaths.

2. Set the path in the admin system settings.

3. Create a TinyMCE plugin in my project like so:

[TinyMCEPluginNonVisualAttribute(
AlwaysEnabled = true,
PlugInName = "TinyMceConfig",
DisplayName = "TinyMCE textstyles ",
Description = "Set custom text styles in Tiny MCE editor",
EditorInitConfigurationOptions = @"{
paste_auto_cleanup_on_paste : true,
content_css : ""MYPATH/Editor.css""
}"
)]

public class TinyMceConfig
{
}

None of these approaches have worked.

Has anyone managed to get the editor to reference a custom CSS file?

Thanks,

Robert

#54032
Sep 29, 2011 12:37
Vote:
 

You can reference a css file using one of the following approaches:

http://sdk.episerver.com/library/cms6.1/Developers%20Guide/Advanced%20Features/Tutorials/Change%20the%20CSS%20for%20the%20Editor.htm

#54034
Sep 29, 2011 12:58
Vote:
 

Thanks for your reply, I have actually just cracked it!

The CSS was being set but seemed to be cached quite severely, a few refreshes later and it seems to be working ok.

Thanks again,

Robert

#54035
Sep 29, 2011 13:03
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.