Tuesday, June 18, 2013

SharePoint 2013 - How to make the discussion edit window wider without altering the Master Pages.

One of many SharePoint tips...

When creating or editing a discussion, the text field for the body of the discussion is way too narrow. Can it be changed?

There are a few ways, the easiest is to implement JQuery in a web part on the page, that way no-one is mucking with the templates in SharePoint - which can be overwritten in patches, etc.

This following way would need to be done at each site or sub-site as the editform.aspx is unique (copied from the site collection level once a site is created). Which means implementing this at one site will not affect this form on any other site.

Note: You need design rights or site ownership rights in order to perform this modification.

Go to the site you would like to implement this on.
Go to a discussion, click the Ellipses (...) and then the Edit choice and you should see a layout similar to this where the "Body" textarea is fairly narrow.

You'll want to edit the page this form displays in, which is why I've highlighted the gear in the upper right hand corner, click on it and then select "Edit Page":

Now you will want to click the "Add a Web Part", we're going to be adding a Content Editor

After you click "Add a Web Part", chose Media and Content, then Content Editor and click "Add":

Now you will see your page again with your newly added Content Editor web part. Click the "Click here to add new content":

It will then place your cursor in the Content Editor, but what we want to do is edit the HTML, so select the Edit Source button as shown here:

In the HTML Source editing window, type the following code:

Your window should now look like this:

Click the "OK" button at the bottom of the HTML Source window. Then you are back on the edit page, click the "Page" on the ribbon and select "Stop Editing" as shown here:

It will redirect you to the discussion list, so go back into a discussion, click the Ellipses and Edit, and now your text areas should be wider like this:

Happy Customizing.

No comments: