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'm trying to add a custom action in the Ribbon.EditingTools.CPEditTab.Markup group. My goal is to add a button that fires a custom javascript that inject som html content in the rich editor control of a wiki site (related to my previous question).

When I try with SPD, even if I can write Ribbon.EditingTools.CPEditTab.Markup, the custom action is not displayed.

How can I add such custom action using either SPD or Powershell ?

I've also tried with a Powershell script like this :

$site = Get-SpSite "http://server/sites/coll"
$ca = $site.UserCustomActions.Add()
$ca.Name = "test"
$ca.Title = "Test"
$ca.Location = "Ribbon.EditingTools.CPEditTab.Markup"
$ca.Url = "javascript:alert('Working')"
$ca.Update();

Please note this is a custom action used for only one site. I'd like to avoid to create a feature for this purpose.

share|improve this question
add comment

1 Answer

This should help you http://msmvps.com/blogs/cobrien/archive/2010/01/25/adding-ribbon-items-into-existing-tabs-groups-ribbon-customization-part-2.aspx

To only activate for a single sub-site, make sure your Feature is targeted to a WEB, which should then be activated for your web only.

Hope it helps, C:\Marius

share|improve this answer
1  
I've read this article. My question was targeting SPD or maybe PS. Here I'll have to buidl a feature, package, etc. which I wanted to avoid. –  Steve B May 15 '12 at 12:59
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.