SharePoint CEWP Solution Interface – Introduction
Guest Author: Peter Allen
BitsOfSharePoint
Introduction
How to make a code free CEWP solution for the end user! Read On.

End user: "HELP!!! All these solutions using the Content Editor Web Part, look like they will address my issues, but I know NOTHING about code. I do not understand how I am to change something called variables to make it work on my site. I am not sure I can implement this, but I wish I could."
How many times have we been told this or have not since the end user may get overwhelmed and moves on. I bet that your CEWP solutions have not been implemented more times then you care to know because of this issue.
I listened to one of Mark Millers presentations at www.endusersharepoint.com where he had a panel discussing the needs of information workers. One of the topics was about how even the great CEWP solutions were still a lot of work for the information worker to easily install and thus information works leave and do not implement the solution.
I have had many email conversations with information workers wanting to implement a solution of mine, but were hung up on where exactly should the changes take place. When they say they have tried everything I ask them to send me the code and then I can see if they have added the info correctly. Only those who are determined to make the solution work will go though all these steps. Many will just walk away because it is too hard to find the right place in the code to make the changes.
Wouldn’t it be great if we could make an interface for the end user so that they do not have to look at code, boy this would make it a lot easier!! |
So I got to thinking about this problem and then it dawned on me that Microsoft has provided in the CEWP a way to add code directly, Source Editor, and a way to visually edit content, Rich Text Editor (RTE). We have the tools right there to make an interface using the RTE, but how do we take information added in the RTE and use it in the code? This is where jQuery comes in and helps us pull the data entered in the RTE by the user. Now that is exciting.
In summary we have the ingredients to create a better way for information workers to implement our solutions in a no code manner, YEAH!
Overview
What is CEWP Solution Interface? Who is this geared for? It is all about providing CEWP solution developers an easier way to deploy solution that require customizations. This series of articles is geared for the solution developer with the intention to help the end user or information worker to have an easier time install CEWP solutions.
So what problem are we trying to solve? Simply ease of use. Microsoft started this with the introduction SharePoint, which made it some much easier for the end user to create a collaborative site without having to go to IT. Now we need to do the same for the CEWP solutions that we create.
Your CEWP solution uses JavaScript or jQuery to solve many needs, but many times for the solution to work in the end user SharePoint environment the end user needs to go into the code of your solution and change variables. This solution is an attempt to solve the problem for the both the creator of the solution and the end user installing it.
So, let’s create a way that the end user does not have to go into the code to make changes. The rest of this article will outline the high level view of how this solution will work. We will create an interface that can capture the required variables from the end user to be used in your solution using JaveScript and jQuery for the solutions. If this interest you please read on.
What we need:
- CEWP – check
- Source Editor – check
- Rich Text Editor (RTE) – check
- JavaScript – check
- jQuery – check (I will show how we can have this dynamic being local or externally hosted.)
So let’s transform this from The Old Way where the information worker has to look through code like this to find the right place to make changes. Code changes should really just be made by the creator, not the implementer.
Let’s transform to a new way that looks and feels more like an options panel. As you can see in the The New Way the information worker does not have to look at any code. They have a nice form that has instruction on what to do. This should make it much easier to implement your CEWP solution.

We also can have the option to communicate when there are errors or missing information. The more we can communicate to the end user the better the experience and the more likely that an end user can solve problems without getting frustrated and needing to go back to the developer.
Below you see images where we can display errors when they occur. The wonderful part is that we can show errors even when they are not in edit page mode. The example below shows the error in the standard page view.

In addition to communicating errors we can communicate information about the solution. Now we can identify what solution it is, what version it is and provide the user a URL to find and read about the latest info on the solution. This information should only be shown when we are in edit mode and we can do that too. Again, we can communicate more information about the solution and how the end user can access details about the solution.

Next Steps
In the next series of articles I will outline how we wrap your CEWP solution with the above interface and transform how users interact with your solution. We will start off with the basics in the next articles and focus on just having the interface for the end user to add the variables needed. We then will progress in to Solution Info panel, error checking and how we implement jQuery.
Hope you find this helpful. Please send me any comments.
Guest Author: Peter Allen
BitsOfSharePoint
Peter Allen is a SharePoint enthusiast and evangelist having deployed solutions in Healthcare, financial, and engineering firms. He has worked in the technology field for 15 years creating solutions both internally and externally for clients. He has worked at start-ups, mid and larger corporations and has consulted. He currently hosts a site http://www.bitsofsharepoint.com where he blogs about solutions to extend the features of SharePoint.
- SharePoint CEWP Solution Interface - Introduction
- SharePoint CEWP Solution Interface - Part II
This looks very promising, can’t wait to see the rest.
Eric – It’s more than promising. I’ve been using it on a couple of solutions and it’s jaw dropping. Once Peter finishes his series, I think it will change how people manage the configuration of their CEWP solutions. — Mark
very cool.
This is a huge HS. I love it.
Sounds like users the world over will be throwing hugs and kisses real soon!
More HS
For those of you who haven’t taken a live online workshop with EndUserSharePoint.com, “HS” stands for “Holy Smokes!” and is the highest form of compliment for Peter’s proposed solution.
HS ^ 2
More please!
Bravo!
This is a classic..”Why didn;t I think of that!”
Looking forward to the rest of the articles, and will implement!
Thank all for the great comments. I am working on the second article this weekend and hope to have it out early in the week. This one will have some of the meat you are looking for. I will first roll out the basic version and then in next few articles add the bells and whistles.
Peter, what you are providing is a remarkable method for us non code users. In my experience most IT programmers, and developers can’t seem to understand that doing things simple for the user is a much better thing in the long run for the very code they want distributed and used, whether its for sale or if its free.
This method needs to go on every SharePoint user group on the internet, if it will work as you say.
I don’t see why it would not work on SP 2010, either. Right?
Tom
Hi,
This approach is so promising and I believe will bring us miles forward on being able to implement custom solutions in SP. The one piece of feedback which any full on developer will probably throw at you is documentation. What ever settings are being entered by the users need to be gathered someone such that if there is a need to revisit/rebuild there is a source to work from. With all my SP work I create an XLS requirements/specification document which I would look at adding this sort of detail to. As a result some sort of self documentation function would be really handy. You could use XSLT to convert the variables into some sort of documentation which could then be copied and pasted to your documentation.
HTH
Mat
I am one of those “don’t show me code” users, so I started reading your article because it sounded like the solution I was looking for, but it’s for the techies to implement first and not end users to use now. (It’s a great idea, but I’d need to find an expert at at each of my clients who know the code).
What would really help, is a showcase of CEWP solutions somewhere with code we can just copy and paste into the source editor explaining Exactly which field we need to change to make it work. Then you wouldn’t need to go to these lengths. Contenteditorwebpart.com came close, but it’s a bit messy and needs to be “dumbed down”. A simple 3 column thing – snapshot of the solution – copy and paste part – and what to change to make it work in no geek speak.
All my users have access to the CEWP, I want to be able to empower them (and myself) to design their own solutions without them having to learn / understand code.
Veronique,
The goal of this solution is so that CEWP Solutions that are created can have an easy interface for the end user to enter the information they need to make them work in the end users environment. The ideal results is that with this interface CEWP Solution developers could just provide the Web Part to download and not need to display the code.
You mentioned wanting to see examples of this working and I have provides several links below to Web Parts that you can download and install that use the new interface.
Your last comment I am not sure I understand. If it means that your users can install the solutions others have created, but make it easier to work with, then this solution will help if the creator of the solution has implemented this interface.
If you mean that you take this interface and any solution created for the CEWP and have them plug in together code free, that would be a completely different solution that would then drive towards API’s.
Here are some examples of the interface in place for CEWP solutions.
http://www.bitsofsharepoint.com/ExamplePoint/CodeExamples/List_from_any_Site_Example_BitsOfSharePoint.dwp
http://www.bitsofsharepoint.com/ExamplePoint/Site/ListSearch.aspx
http://www.bitsofsharepoint.com/ExamplePoint/CodeExamples/List_Filter_-_BitsOfSharepoint_comv.2.1.dwp
Hope this helps.
Mathew,
You bring up some interesting thoughts about how this solution could grow. I am not familiar with what you are doing. Do you have some examples, articles or documentation that I could read to understand better what you are describing?
Peter – your website is amazing, now that is something even I can attempt. :-) It is exactly what I am looking for.
Wow Peter, this is awesome, thanks a ton!
Hi Peter,
Unfortunately I don’t have any resources apart from highlighting the current self documenting approaches that are embedded in .Net and Java. I suspect that you may be able to add a function that self documents the settings of the current CEWP you are working with so they can be backed up.
I can be available to bounce ideas off or help research approaches if need be.
HTH
Mat