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
formComponentCommandInvokerIFormComponentCommandInvokerInvoker of form component commands.
formDataBinderIFormDataBinderDefines methods binding data from and to form components.
configurationProviderIRichTextEditorConfigurationProviderRTE configuration provider.
httpContextAccessorIHttpContextAccessorAccessor for HTTP context.
htmlSanitizerIHtmlSanitizerHTML sanitizer.
contentLanguageRetrieverIContentLanguageRetrieverContent language retriever.
htmlSanitizerConfigurationProviderIHtmlSanitizerConfigurationProviderHtml 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
clientPropertiesRichTextEditorClientPropertiesThe 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.
[FormComponentCommand]
[Obsolete("Media libraries and their APIs are obsolete and will be discontinued in the future. Please migrate all media library files to Content hub and use their corresponding content item APIs.")]
public Task<ICommandResponse<LoadAssetFoldersResult>> LoadAssetFolders(LoadAssetFoldersCommandArguments args)
Parameters
Returns
LoadAssetItems(LoadAssetItemsCommandArguments)
Loads asset panel items.
[FormComponentCommand]
[Obsolete("Media libraries and their APIs are obsolete and will be discontinued in the future. Please migrate all media library files to Content hub and use their corresponding content item APIs.")]
public Task<ICommandResponse<LoadAssetItemsResult>> LoadAssetItems(LoadAssetItemsCommandArguments args)
Parameters
Returns
LoadAssetLibraries()
Loads asset libraries.
[FormComponentCommand]
[Obsolete("Media libraries and their APIs are obsolete and will be discontinued in the future. Please migrate all media library files to Content hub and use their corresponding content item APIs.")]
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.
[FormComponentCommand]
public Task<ICommandResponse<FormChangeResult>> MoveItemFormChange(FormChangeCommandArguments args, CancellationToken cancellationToken = default)
Parameters
argsFormChangeCommandArgumentsForm change command arguments.
cancellationTokenCancellationTokenCancellation instruction.
Returns
- Task<ICommandResponse<FormChangeResult>>
SetValue(string)
Sets the value of the form component.
public override void SetValue(string value)
Parameters
valuestringValue 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.
[FormComponentCommand]
[Obsolete("Media libraries and their APIs are obsolete and will be discontinued in the future. Please migrate all media library files to Content hub and use their corresponding content item APIs.")]
public Task<ICommandResponse<UploadAssetsCommandResult>> UploadAssets(UploadAssetsCommandArguments args)
Parameters
argsUploadAssetsCommandArgumentsUpload command arguments.