November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Product version: |
EPiServer CMS 6.0 / R2 |
---|---|
Document version: |
1.0 |
Document last saved: |
This tech note explains which controls that will be used in edit mode for PropertyLongString and PropertyXhtmlString, and how to configure these the way you want them.
There are now three built in controls that can be used:
Using the PropertyControlClassFactory you can override the defaults.
If you in the web.config file register the LegacyPropertyXhtmlControl for both PropertyXhtmlString and PropertyLongString, the "old behavior" (legacy editor depending on settings) will be used in Edit mode.
<add type="EPiServer.Core.PropertyControlClassFactory, EPiServer" id="PropertyControlFactory">
<register type="EPiServer.SpecializedProperties.PropertyXhtmlString, EPiServer" mappedType="EPiServer.Web.PropertyControls.LegacyPropertyXhtmlStringControl, EPiServer" />
<register type="EPiServer.Core.PropertyLongString, EPiServer" mappedType="EPiServer.Web.PropertyControls.LegacyPropertyXhtmlStringControl, EPiServer" />
</add>
Since the default settings gives us a TinyMCE editor for PropertyXhtmlString, we only need to register PropertyLongString to use the PropertyXhtmlStringControl. However, note that this is not really recommended since Dynamic Content and Link parsing will not occur on PropertyLongStrings.
<add type="EPiServer.Core.PropertyControlClassFactory, EPiServer" id="PropertyControlFactory">
<register type="EPiServer.Core.PropertyLongString, EPiServer" mappedType="EPiServer.Web.PropertyControls.PropertyXhtmlStringControl, EPiServer" />
</add>
If you specify more than one control to use for each property type, you will be able to specify which control to use when editing page property types in Admin mode. In Admin mode it is possible to set the Property definition on a more “global” level, for instance on XHtmlStringProperty, or on page type property level, for instance News Page – MainBody.
Without making any changes in Admin mode the default control used will be the first registered type.
The following settings will give an administrator the possibility to choose between the three built in controls. By default the PropertyXhtmlStringControl will be used.
<add type="EPiServer.Core.PropertyControlClassFactory, EPiServer" id="PropertyControlFactory">
<register type="EPiServer.SpecializedProperties.PropertyXhtmlString, EPiServer" mappedType="EPiServer.Web.PropertyControls.PropertyXhtmlStringControl, EPiServer" />
<register type="EPiServer.SpecializedProperties.PropertyXhtmlString, EPiServer" mappedType="EPiServer.Web.PropertyControls.LegacyPropertyXhtmlStringControl, EPiServer" />
<register type="EPiServer.SpecializedProperties.PropertyXhtmlString, EPiServer" mappedType="EPiServer.Web.PropertyControls.PropertyLongStringControl, EPiServer" />
</add>