Table of Contents

Class RichTextEditorComponent

Namespace
Kentico.Xperience.Admin.Base.Forms
Assembly
Kentico.Xperience.Admin.Base.dll

Represents a rich text editor form component.

[ComponentAttribute(typeof(RichTextEditorComponentAttribute))]
public sealed class RichTextEditorComponent : FormComponentWithNestedComponents<RichTextEditorProperties, RichTextEditorClientProperties, string>, IFormComponent, IFormItem<IFormComponentClientProperties>, IFormItem
Inheritance
object
RichTextEditorComponent
Implements
Inherited Members
Extension Methods

Constructors

RichTextEditorComponent(IFormComponentCommandInvoker, IFormDataBinder, IRichTextEditorConfigurationProvider, IHttpContextAccessor, IHtmlSanitizer, IContentLanguageRetriever, IHtmlSanitizerConfigurationProvider)

Creates an instance of RichTextEditorComponent class.

public RichTextEditorComponent(IFormComponentCommandInvoker formComponentCommandInvoker, IFormDataBinder formDataBinder, IRichTextEditorConfigurationProvider configurationProvider, IHttpContextAccessor httpContextAccessor, IHtmlSanitizer htmlSanitizer, IContentLanguageRetriever contentLanguageRetriever, IHtmlSanitizerConfigurationProvider htmlSanitizerConfigurationProvider)

Parameters

formComponentCommandInvoker IFormComponentCommandInvoker

Invoker of form component commands.

formDataBinder IFormDataBinder

Defines methods binding data from and to form components.

configurationProvider IRichTextEditorConfigurationProvider

RTE configuration provider.

httpContextAccessor IHttpContextAccessor

Accessor for HTTP context.

htmlSanitizer IHtmlSanitizer

HTML sanitizer.

contentLanguageRetriever IContentLanguageRetriever

Content language retriever.

htmlSanitizerConfigurationProvider IHtmlSanitizerConfigurationProvider

Html sanitizer configuration provider.

Fields

IDENTIFIER

Represents the RichTextEditorComponent identifier.

public const string IDENTIFIER = "Kentico.Administration.RichTextEditor"

Field Value

string

Properties

ClientComponentName

Name of the front-end type implementing the UI form component.

public override string ClientComponentName { get; }

Property Value

string

NestedComponents

List of components within nested form.

public IEnumerable<IFormItem> NestedComponents { get; set; }

Property Value

IEnumerable<IFormItem>

Methods

ConfigureClientProperties(RichTextEditorClientProperties)

Configures the form component client properties.

protected override Task ConfigureClientProperties(RichTextEditorClientProperties clientProperties)

Parameters

clientProperties RichTextEditorClientProperties

The current instance of the form component client properties.

Returns

Task

Remarks

Override this method in order to configure form component client properties.

GetNestedFormItems()

Returns the form items that are used within the nested form.

protected override Task<ICollection<IFormItem>> GetNestedFormItems()

Returns

Task<ICollection<IFormItem>>

GetValue()

Gets the value of the form component.

public override string GetValue()

Returns

string

Returns the value of the form component.

Remarks

The value can be additionally modified before it is retrieved for data propagation.

LoadAssetFolders(LoadAssetFoldersCommandArguments)

Loads asset folders.

public Task<ICommandResponse<LoadAssetFoldersResult>> LoadAssetFolders(LoadAssetFoldersCommandArguments args)

Parameters

args LoadAssetFoldersCommandArguments

Returns

Task<ICommandResponse<LoadAssetFoldersResult>>

LoadAssetItems(LoadAssetItemsCommandArguments)

Loads asset panel items.

public Task<ICommandResponse<LoadAssetItemsResult>> LoadAssetItems(LoadAssetItemsCommandArguments args)

Parameters

args LoadAssetItemsCommandArguments

Returns

Task<ICommandResponse<LoadAssetItemsResult>>

LoadAssetLibraries()

Loads asset libraries.

public Task<ICommandResponse<LoadAssetLibrariesResult>> LoadAssetLibraries()

Returns

Task<ICommandResponse<LoadAssetLibrariesResult>>

MoveItemFormChange(FormChangeCommandArguments, CancellationToken)

Handles the change command for confirmation dialog. The command is invoked whenever visibility conditions or form component configurators of the form need to be reevaluated to re-render the form.

public Task<ICommandResponse<FormChangeResult>> MoveItemFormChange(FormChangeCommandArguments args, CancellationToken cancellationToken = default)

Parameters

args FormChangeCommandArguments

Form change command arguments.

cancellationToken CancellationToken

Cancellation instruction.

Returns

Task<ICommandResponse<FormChangeResult>>

SetValue(string)

Sets the value of the form component.

public override void SetValue(string value)

Parameters

value string

Value to be set.

Remarks

The value can be additionally modified for component usage. Component is fully configured when method is called.

UploadAssets(UploadAssetsCommandArguments)

Upload files to media library.

public Task<ICommandResponse<UploadAssetsCommandResult>> UploadAssets(UploadAssetsCommandArguments args)

Parameters

args UploadAssetsCommandArguments

Upload command arguments.

Returns

Task<ICommandResponse<UploadAssetsCommandResult>>