Try our conversational search powered by Generative AI!

Class PropertyLongStringControl

Property control that creates a html editor. The control might load different editors depending on your browser.

Inheritance
System.Object
PropertyLongStringControl
Implements
System.Web.UI.INamingContainer
Inherited Members
Namespace: EPiServer.Web.PropertyControls
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
public class PropertyLongStringControl : PropertyLongStringControlBase, IPropertyControl, INamingContainer, IRenderSettings

Constructors

PropertyLongStringControl()

Declaration
public PropertyLongStringControl()

Properties

EditControl

Gets or sets the control used to edit the property.

Declaration
protected WebControl EditControl { get; set; }
Property Value
Type Description
System.Web.UI.WebControls.WebControl

The control used to edit the property.

FolderID

Gets the ID of the page folder.

Declaration
public virtual int FolderID { get; }
Property Value
Type Description
System.Int32

The ID of the page folder.

Gets or sets the page link for the page that the editor is contained in.

Declaration
public virtual PageReference PageLink { get; set; }
Property Value
Type Description
PageReference

The page link for the page that the editor is contained in.

This is used to specify the current page for external resources like the link editor.

Gets or sets the parent page link for the page that the editor is contained in.

Declaration
public virtual PageReference ParentLink { get; set; }
Property Value
Type Description
PageReference

The page link for the parent page for the page that the editor is contained in.

This is used to specify the parent page for external resources like the link editor. This can be used when the page has not been created yet.

Methods

ApplyEditChanges()

Applies changes for the posted data to the page's properties when the RenderType property is set to Edit.

Declaration
public override void ApplyEditChanges()
Overrides
Remarks

This method is called from ApplyChanges() if the control does not have an adapter.

Clears any link where the A tag is empty and it doesn't contain a name or id attribute.

Declaration
public static string ClearEmptyLinks(string text)
Parameters
Type Name Description
System.String text

The text to clear any empty links from.

Returns
Type Description
System.String

A string without any empty A tags.

CreateEditControls()

Creates an edit interface for the property.

Declaration
public override void CreateEditControls()
Overrides

CreateTextBox()

Creates a TextBox to be able to edit the property.

Declaration
protected virtual TextBox CreateTextBox()
Returns
Type Description
System.Web.UI.WebControls.TextBox

A new TextBox.

GetCssPaths()

Use CSS-path in UIEditorCssPaths if defined, otherwise default CSS from configuration. The configuration value is a comma separated list of resolved paths.

Declaration
protected virtual string GetCssPaths()
Returns
Type Description
System.String

Relative CSS-path to be used in editor

GetCssPathsForPage(PageData)

Gets a comma separated list of CSS paths for the given page.

Declaration
[Obsolete("Use EPiServer.Editor.PageBaseExtensions.GetEditorCssPaths instead.", true)]
public static string GetCssPathsForPage(PageData page)
Parameters
Type Name Description
PageData page

The EPiServer page.

Returns
Type Description
System.String

A comma separated list of CSS paths for the given page

Remarks

If the page has the property UIEditorCssPaths defined it will be used, otherwise the configuration value for uiEditorCssPaths in web.config will be used.

Examples

"/rootDir/Templates/Public/Styles/Default/Editor.css,/rootDir/Templates/Public/Styles/Default/Editor2.css"

GetEditFormat()

Gets the edit format for the string.

Declaration
protected string GetEditFormat()
Returns
Type Description
System.String

The content of the property in editor mode.

Remarks

This method ensures that dynamic content is created with internal mode instead of preview mode.

InitializeData(PropertyDataCollection)

Initializes private variables.

Declaration
protected virtual void InitializeData(PropertyDataCollection properties)
Parameters
Type Name Description
PropertyDataCollection properties

The properties that are beeing edited.

ResolveCssPaths(String)

Resolves a ',' separated string of relative CSS paths so they become absolute paths from application root.

Declaration
protected static string ResolveCssPaths(string cssPath)
Parameters
Type Name Description
System.String cssPath

The CSS path.

Returns
Type Description
System.String

A comma separated list of resloved CSS paths for the given page

Examples

"~/Public/Styles/Default/Editor.css" will be resolved to "/Public/Styles/Default/Editor.css"

SetupControl()

Called when setting up the properties for a page.

Declaration
public override void SetupControl()
Overrides
Remarks

If the control creates it's child controls in CreateChildControls(), EnsureChildControls() should be called in this method to make sure the child controls are created before loading post data.

Implements

System.Web.UI.INamingContainer

Extension Methods