SharePoint 2010 – Create Custom Style for SharePoint Rich Text Editor. – Create Custom Table Style

10 באפריל 2011

אין תגובות

Inside SharePoint Rich Text Editor you can use some predifined style for example this picture shows predifined styles for table's element.

If you want to add or edit those styles, you can do this inside corev4.css, which is placed inside this directory

for English Installation – 1033 Directory.

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\Themable\COREV4.CSS

Open this file and find for example "Default Table Style – Light" – first predefined style.

.ms-rteTable-default, .ms-rteTableHeaderFirstCol-default, .ms-rteTableHeaderLastCol-default,
.ms-rteTableHeaderOddCol-default, .ms-rteTableHeaderEvenCol-default, .ms-rteTableFirstCol-default,
.ms-rteTableLastCol-default, .ms-rteTableOddCol-default, .ms-rteTableEvenCol-default,
.ms-rteTableFooterFirstCol-default, .ms-rteTableFooterLastCol-default, .ms-rteTableFooterOddCol-default,
.ms-rteTableFooterEvenCol-default,,, .ms-rtetablecells
-ms-name:"Default Table Style – Light";
/* [ReplaceColor(themeColor:"Light1-Medium")] */ border:solid 1px #c4c4c4;

Copy all this part of style definition and paste it, give new name for style's classes and

change parameter -ms-name: for desire name and save this file. For example: Here new style with

table, that has white border.

.ms-rteTable-white,.ms-rteTableHeaderFirstCol-white,.ms-rteTableHeaderLastCol-white,.ms-rteTableHeaderOddCol-white,.ms-rteTableHeaderEvenCol-white,.ms-rteTableFirstCol-white,.ms-rteTableLastCol-white,.ms-rteTableOddCol-white,.ms-rteTableEvenCol-white,.ms-rteTableFooterFirstCol-white,.ms-rteTableFooterLastCol-white,.ms-rteTableFooterOddCol-white,.ms-rteTableFooterEvenCol-white,,,.ms-rtetablecells {-ms-name:"Default Table Style – White Border";/* [ReplaceColor(themeColor:"Light1-Medium")] */ border:solid 1px white;padding:2px;vertical-align:top;}

Refresh your page and you see new style inside popup menu.

In this way you can add new style not only to table element, but to another elements too.


הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *