0

I'm working on SharePoint online (office 365) custom app, I have built a full ribbon using JavaScript by depending on (CUI.js,Ribbon.js). The problem I have faced, I need to append the RTE ribbon buttons Format Text and Insert tabs on my ribbon when click on RTE div which has the RTE classs and attributes(ms-rte-layoutszone-inner-editable ms-rtestate-write,...etc). I found jQuery.spHtmlEditor.js but these plugin destroy my ribbon because it is reinitialize the ribbon. However, the office 365 prevent running server-side code but in case SharePoint on-promises I have just added the following code:

 protected override void OnPreRender(EventArgs e)
{
SPRibbon currentRibbon = SPRibbon.GetCurrent(this.Page);
currentRibbon.MakeTabAvailable("COB.SharePoint.Ribbon.ContextualTab");
currentRibbon.MakeContextualGroupInitiallyVisible("COB.SharePoint.Ribbon.ContextualGroup", string.Empty);

base.OnPreRender(e);
}

Summery : I need an approach that can be enable the RTE ribbon tabs using JavaScript

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.