Class RichTextEditorComponent
Represents a rich text editor form component.
[ComponentAttribute(typeof(RichTextEditorComponentAttribute))]
public sealed class RichTextEditorComponent : FormComponentWithNestedComponents<RichTextEditorProperties, RichTextEditorClientProperties, string>, IFormComponent, IFormItem<IFormComponentClientProperties>, IFormItem
- Inheritance
-
objectRichTextEditorComponent
- 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
IFormComponentCommandInvokerInvoker of form component commands.
formDataBinder
IFormDataBinderDefines methods binding data from and to form components.
configurationProvider
IRichTextEditorConfigurationProviderRTE configuration provider.
httpContextAccessor
IHttpContextAccessorAccessor for HTTP context.
htmlSanitizer
IHtmlSanitizerHTML sanitizer.
contentLanguageRetriever
IContentLanguageRetrieverContent language retriever.
htmlSanitizerConfigurationProvider
IHtmlSanitizerConfigurationProviderHtml 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
RichTextEditorClientPropertiesThe 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
Returns
LoadAssetItems(LoadAssetItemsCommandArguments)
Loads asset panel items.
public Task<ICommandResponse<LoadAssetItemsResult>> LoadAssetItems(LoadAssetItemsCommandArguments args)
Parameters
Returns
LoadAssetLibraries()
Loads asset libraries.
public Task<ICommandResponse<LoadAssetLibrariesResult>> LoadAssetLibraries()
Returns
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
FormChangeCommandArgumentsForm change command arguments.
cancellationToken
CancellationTokenCancellation instruction.
Returns
- Task<ICommandResponse<FormChangeResult>>
SetValue(string)
Sets the value of the form component.
public override void SetValue(string value)
Parameters
value
stringValue 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
UploadAssetsCommandArgumentsUpload command arguments.