Sitecore 8 introduced a new Speak-based ribbon in page editor. Several other people have already blogged about how you can support this ribbon with your own custom ribbon buttons. If you are not already familiar with those blogs, you should probably read at least one of them before continuing.
In Sitecore 8.1, the Experience Editor script was refactored. Where before you had Sitecore.ExperienceEditor, now you have to load it as a dependency using RequireJs. The same command would look like this in Sitecore 8.1:
The difference is small but significant. If you use the 8.0 version in 8.1 you will get an error stating that Sitecore.ExperienceEditor.PipelinesUtil is undefined. If you use the 8.1 version in 8.0, you get an error from RequireJs because it can’t find the ExperienceEditor.js file.
The client pipelines have the same issue. A processor for a client pipeline in Sitecore 8.0 might look like this:
In 8.1 it would look like this:
If you are building a module that needs to support multiple versions, this small difference is going to cause you some major headaches. Fortunately, it is easy to fake the new ExperienceEditor dependency in Sitecore 8.0. Just create a file named ExperienceEditor.js with the following script and drop it in the /sitecore/shell/client/Sitecore/ExperienceEditor folder.
That’s all there is to it. Now Sitecore 8.0 can use the same client-side command and pipeline scripts as 8.1. Just make sure you don’t deploy that file to an instance of 8.1 or you’ll overwrite the real file!