Adding to TableEditor Styles in RadEditor

Posted by Community Admin on 04-Aug-2018 20:47

Adding to TableEditor Styles in RadEditor

All Replies

Posted by Community Admin on 16-Jan-2013 00:00

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>

Posted by Community Admin on 21-Jan-2013 00:00

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

Posted by Community Admin on 24-Jan-2013 00:00

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.

This thread is closed