Last updated: Oct 27 2016

Area: Episerver CMS Applies to versions: 10 and higher
Other versions:

Configuring the default editor wrapper

This topic describes how to configure the editor wrapper in Episerver. The default wrapper is floating, however you can also change this to use the flyout wrapper.

How it works

A floating editor appears next to its respective property and only takes as much size as required so you can see more of what is changing on the page as you edit the property. However, in some cases, the default editor wrapper may need to be changed to the flyout wrapper. 

At initialization time, before the UI is displayed so that the correct confiuration data gets sent to the interface, use InitializableModule to configure of the default editor wrapper. In the following example, set the default editor wrapper property on the UI defaults object. This defaults object is stored as a singleton within the service locator.

Example

using EPiServer.Cms.Shell;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.Shell;

namespace MyProject.Business.Initialization
{
    [InitializableModule]
    [ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
    public class UIDefaultsInitialization : IInitializableModule
    {
        public void Initialize(InitializationEngine context)
        {
            // The supported default editor wrapper types are flyout and floating.
            context.Locate.Advanced.GetInstance<CmsUIDefaults>().DefaultEditorWrapper = UiWrapperType.Flyout;
        }

        public void Preload(string[] parameters) { }

        public void Uninitialize(InitializationEngine context) { }
    }
}

Comments