Try our conversational search powered by Generative AI!

Class EditorExtensions

Extension methods used by the Editors.

Inheritance
System.Object
EditorExtensions
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.Editor
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public static class EditorExtensions

Methods

GetEditorContext(IContent)

Gets the editor context.

Declaration
public static object GetEditorContext(this IContent content)
Parameters
Type Name Description
IContent content

The content.

Returns
Type Description
System.Object

GetEditorContext(PageData)

Gets a context object used for propagating page information to editor dialogs.

Declaration
public static object GetEditorContext(this PageData pageData)
Parameters
Type Name Description
PageData pageData

A PageData object.

Returns
Type Description
System.Object

An object with page information suitable for serialization to JSON

GetEditorCSSPaths(ContentData)

Gets the editor CSS paths for the current ContentData. Will get the UIEditorCssPaths property for current ContentData or from the value configured in settings of current site.

Declaration
public static string[] GetEditorCSSPaths(this ContentData contentData)
Parameters
Type Name Description
ContentData contentData

A ContentData object.

Returns
Type Description
System.String[]

A string array of resolved CSS paths for the given ContentData

GetEditorCSSPaths(ContentData, IContentRepository)

Gets the editor CSS paths for the current ContentData. Will get the UIEditorCssPaths property for current page or from the value configured in settings of current site.

Declaration
public static string[] GetEditorCSSPaths(this ContentData contentData, IContentRepository contentRepository)
Parameters
Type Name Description
ContentData contentData

A ContentData object.

IContentRepository contentRepository

A IContentRepository object.

Returns
Type Description
System.String[]

A string array of resolved CSS paths for the given ContentData

GetEditorCSSPaths(PageBase)

Gets the editor CSS paths for the current page. Will get the UIEditorCssPaths property for current page or from the value configured in settings of current site.

Declaration
[Obsolete("Use GetEditorCSSPaths(this PageData page) instead", false)]
public static string[] GetEditorCSSPaths(this PageBase page)
Parameters
Type Name Description
PageBase page

The page.

Returns
Type Description
System.String[]

A string array of resolved CSS paths for the given page

GetEditorCSSPaths(PageBase, IContentRepository)

Gets the editor CSS paths for the current page. Will get the UIEditorCssPaths property for current page or from the value configured in settings of current site.

Declaration
[Obsolete("Use GetEditorCSSPaths(this PageData page,  IContentRepository contentRepository) instead", false)]
public static string[] GetEditorCSSPaths(this PageBase page, IContentRepository contentRepository)
Parameters
Type Name Description
PageBase page

The page.

IContentRepository contentRepository

The content repository.

Returns
Type Description
System.String[]

A string array of resolved CSS paths for the given page