1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Adding to TableEditor Styles in RadEditor

Adding to TableEditor Styles in RadEditor

3 posts, 0 answered
  1. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    16 Jan 2013
    Link to this post
    I would like to add the the list of predefined table styles found when going into the table properties dialog.  I have looked over the demo page here that talks about how to do this, but I am not having any luck.

    Is this possible to do with the Text Editor settings or does this have to be done as a new control?  I am not finding any literature showing the syntax for setting this in a toolsfile.xml format.

    I have created a tablelayout.css file where I copied the styles found on the demo page.  I then went to Administration -> Settings -> Text Editor and edited the default tool set.  I have tried this two ways so far.

    1.)I created a node like this.

    <tableLayoutCssFile>
          <file name="~/Sitefinity/WebsiteTemplates/AaBoilerPlate/App_Themes/AaBoilerPlate/Styles/tablelaouts.css"/>
    </tableLayoutCssFile>

    2.)
    <property name="TableLayoutCssFile">~/Sitefinity/WebsiteTemplates/AaBoilerPlate/App_Themes/AaBoilerPlate/Styles/tablelayouts.css</property>
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    21 Jan 2013
    Link to this post
    Hello Stacey,

    Thank you for using our services.

    You can set the TableLayoutCss of Sitefintiy's content editor in the same manner it's being configured for our RadEditor control. For more information about the TableLayoutCss please check this online demo.

    In order to configure this in Sitefinity you will need to map an external template for the Telerik.Sitefinity.Web.UI.Fields.HtmlField type and set the location of the TableLayoutCss in the codebehind:

    protected void Page_Load(object sender, EventArgs e)
            {
                this.editControl.TableLayoutCssFile = "~/...";
            }
    For your convenience I've attached a copy of a customized template setting the TableLayoutCss, please modify its code-behind to point to the correct location of your custom CSS.

    Please do not hesitate to let me know if there's anything else I can assist you with. Greetings,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    24 Jan 2013
    Link to this post

    Jen,

    Thanks for the response with the template included.  It seems to be doing what I needed.  For anyone else that follows this keep in mind that if you are running recent versions of Sitefinity you can simply register the control template in the advanced settings under "controls > viewmap" instead of going through the complex file naming convention illustrated in the old blog post linked from above.

3 posts, 0 answered