Try our conversational search powered by Generative AI!

Class TinyMceConfiguration

Options class for configuring TinyMCE settings usage.

Inheritance
System.Object
TinyMceConfiguration
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Cms.TinyMce.Core
Assembly: EPiServer.Cms.TinyMce.dll
Version: 2.13.4
Syntax
public class TinyMceConfiguration

Constructors

TinyMceConfiguration(IObjectSerializerFactory)

Creates a new instance of TinyMceConfiguration.

Declaration
public TinyMceConfiguration(IObjectSerializerFactory objectSerializerFactory)
Parameters
Type Name Description
EPiServer.Framework.Serialization.IObjectSerializerFactory objectSerializerFactory

The factory for creating an object serializer.

Properties

InheritSettingsFromAncestor

If set to true the setting set on the closest ancestor will be used unless a specific setting has been configured If set to false the default setting will be used unless a specific setting has been configured

Declaration
public bool InheritSettingsFromAncestor { get; set; }
Property Value
Type Description
System.Boolean

Methods

Default()

Gets a TinyMceSettings containing the default settings.

Declaration
public TinyMceSettings Default()
Returns
Type Description
TinyMceSettings

A TinyMceSettings containing the default settings.

Empty()

Gets a empty instance of TinyMceSettings

Declaration
public TinyMceSettings Empty()
Returns
Type Description
TinyMceSettings

An empty TinyMceSettings instance

For<T>(Expression<Func<T, Object>>, TinyMceSettings)

Sets the TinyMceSettings for a given property on a given content type.

Declaration
public TinyMceSettings For<T>(Expression<Func<T, object>> property, TinyMceSettings copyFrom = null)
    where T : IContentData
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<T, System.Object>> property

The property to configure to a settings instance for.

TinyMceSettings copyFrom

The TinyMceSettings to use for the given model property. This will override any previous configuration.

Returns
Type Description
TinyMceSettings

The TinyMceSettings that were configured for the given property. If the copyFrom parameter is set then a clone of this will be returned. Otherwise it will return the settings instance associated with the property; falling back to a clone of the default settings if nothing has been previously configured.

Type Parameters
Name Description
T

The type of the content containing the given property.

Use<T, TF>(Expression<Func<T, Object>>, Expression<Func<TF, Object>>)

Use the TinyMceSettings from one property for another property.

Declaration
public void Use<T, TF>(Expression<Func<T, object>> from, Expression<Func<TF, object>> to)
    where T : IContent where TF : IContentData
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<T, System.Object>> from

The property containing the TinyMceSettings to use.

System.Linq.Expressions.Expression<System.Func<TF, System.Object>> to

The property to configure.

Type Parameters
Name Description
T

The type of the content containing the source property.

TF

The type of the content containing the target property.

Exceptions
Type Condition
System.InvalidOperationException

An exception will be thrown when there is no TinyMceSettings configured for the source property.