This is a migrated thread and some comments may be shown as answers.

EditorCssFile Programmatically for Editor background

1 Answer 45 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Moon
Top achievements
Rank 2
Moon asked on 20 Nov 2011, 03:00 AM

My Editor background is using my site's background. Ugh.

http://www.telerik.com/help/aspnet-ajax/editor-content-area-appearance-problems.html
I want to override. I've looked this up and I find code-in-front but want to use codebehind. It should be something like this, but this says the EditorCssFile is not part of the collection.

myEditor.CssFiles.EditorCssFile = resolvePath & "Scripts/RadEditorStyleSheet.css"

 I found this link:
http://www.telerik.com/help/aspnet/editor/radeditor-telerik.webcontrols.radeditor-cssfiles.html
which recommends doing this:
RadEditor1.CssFiles = New String(2) {"~/styles/1.css", "~/styles/2.css"}

But this says "CssFiles" is read only. So it appears this page is obsolete?

How can I load this programmatically?

thanks!



1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Nov 2011, 03:14 PM
Hi Moon,

You can set the CssFiles property via the codebehind like this:

RadEditor1.CssFiles.Add("~/Styles1.css");

See this live demo for more information: Adding CSS Files to Content Area.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
Moon
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or