EditorCssFile Programmatically for Editor background

2 posts, 0 answers
  1. Moon
    Moon avatar
    250 posts
    Member since:
    Apr 2008

    Posted 19 Nov 2011 Link to this post

    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!



  2. Rumen
    Admin
    Rumen avatar
    14431 posts

    Posted 22 Nov 2011 Link to this post

    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
Back to Top