Design and CSS styles
Version 4.x > Design and CSS styles > Editor styles question - styling a TD View modes: 
User avatar
Member
Member
brandon - 4/2/2009 3:53:28 PM
   
Editor styles question - styling a TD
I'm trying to figure out if it's possible to style a TD element using the editor's Style dropdown menu.

Currently, I have this style set up in the site's stylesheet:

.TableHeader {
color: #ffffff;
font-size: 1.1em;
font-weight: bold;
background-color: #2f6da1;
}

So then I have this style set up in the XML file:

<Style name="TableHeader" element="td">
<Attribute name="class" value="TableHeader" />
</Style>

Supposedly the editor does support styles for the TD object, but I can't get it to work for the life of me. When I place my cursor in a table cell which does have <td class="TableHeader"> hand-coded in already, the style dropdown will change to read "TableHeader".

However, if I click the Styles dropdown, "TableHeader" is not listed as a choice. This also happens if I try to style a table cell that does not have a style currently applied. Any ideas?????


User avatar
Member
Member
brandon - 4/3/2009 9:34:00 AM
   
RE:Editor styles question - styling a TD
Well it looks like I'll be answering my own question. I've spent a bunch of time reading through the FCK Editor forums, and it looks like this is just another short-coming of this editor.

Since the styles menu is context sensitive, you would have to be able to select a table cell to be able to apply the style. And since there is NO WAY to select a table cell, you obviously cannot apply a style to it.

The only solution I really see is to eventually add a styles dropdown to the cell properties menu that you access by right-clicking on a table cell and choosing cell > cell properties.

My developers tell me this would be a fairly extreme undertaking, so I was wondering if anyone has done this yet and would be willing to share the code???

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/22/2009 1:04:07 PM
   
RE:Editor styles question - styling a TD
Hi Brandon,

it's probably like you wrote - this issue looks like another FCK's short-coming.

Maybe you could find useful this FCK's plugin http://sourceforge.net/tracker/index.php?func=detail&aid=1448301&group_id=75348&atid=737639
Unfortunatelly we couldn't provide any examples of this plugin usage for the desired functionality, we don't have closer experience with it.

Regards,
Zdenek C.