Posts

Showing posts from January, 2016

SharePoint 2013 Custom web part with rich text box that triggers SharePoint ribbon

I was creating a web part form which needs to have a rich text editor text box.  The SharePoint 2013 ribbon style works well and looks good.  So, I was looking to utilize it.  To keep the story short, I found the solution in a post, http://sharepoint.stackexchange.com/questions/64698/rich-text-editor-ribbon-based-in-a-webpart-in-sharepoint-2013. In case the link disappeared later, I copied the solution below. ASPX / ASCX: id = "editor" > id = "RTEDiv" tabindex = "0" > ID = "RTEDivHidden" runat = "server" /> class = "commands" > ID = "btnSubmit" Text = "Отправить" runat = "server" CssClass = "editorbtn" /> type = "button" value = "Отмена" id = "btnCancel" class = "editorbtn" /> Simple div container, future rich text div  id="RTEDiv" , hidden field to ...

SharePoint 2013 Using Publishing Page as custom forms for content type

I wanted to customize the display, edit, and new form for a custom list.  I took the approach of using a publishing web with custom web part.  The 2 methods that I use to accomplish that are as follow public static void AddWebParts(SPWeb web, string pageUrl, List webParts)         {             using (SPLimitedWebPartManager wpManager = web.GetLimitedWebPartManager(pageUrl, System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared))             {                                 foreach (WebPart webPart in webParts)                 {                     wpManager.AddWebPart(webPart, webPart.ZoneID, 0);                     wpManager.SaveChanges(webPart);     ...