Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a RichHtmlField where I am trying to limit what styles users can apply. I've run into an issue where when I set the PrefixStyleSheet property it disables all of the dropdowns in my "Picture Tools" tab. I specifically need the "Position" options available so that users can wrap text around images.

Is SharePoint doing this on purpose? How do I go about enabling the "Position" dropdown options?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

Weird, I had this exact same problem yesterday, with the exact same Ribbon command!

You basically need to copy the position styles from corev4 into your custom CSS stylesheet, and replace "ms-rte" with whatever you put in the PrefixStyleSheet property.

EDIT: Hint - take a vanilla RTE control (remove the PrefixStyleSheet attribute), add an image, position it, then look at the markup. A CSS class is added. Look for that, and the related ones (think there's about 6) and copy them.

share|improve this answer
    
Thank you yet again James! –  Abe Miessler Jan 20 '12 at 22:36
    
This definitely isn't the first time you've asked a question quite soon after I resolved the same issue myself... you working at the same place? ;) –  James Love Jan 20 '12 at 22:44
    
Anyone have details on exactly which CSS classes need to be copied over? I copied a few but can't seem to get it quite right. –  user7827 Apr 12 '12 at 20:13
add comment

I copied the Image Position drop down menu styles from corev4.css to the site.css file.

.ms-rtePosition-1{
-ms-name:"Left";
float:left;
}
.ms-rtePosition-2{
-ms-name:"Right";
float:right;
}
.ms-rtePosition-3{
-ms-name:"Top";
vertical-align:text-top;
}
.ms-rtePosition-4{
-ms-name:"Middle";
vertical-align:middle;
}
.ms-rtePosition-5{
-ms-name:"Bottom";
vertical-align:text-bottom;
}

Worked fine for me after that.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.