Class RichTextPropertyEditorHelper
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Infrastructure.dll
Syntax
public static class RichTextPropertyEditorHelper
Methods
View SourceSerializeRichTextEditorValue(RichTextEditorValue, IJsonSerializer)
Serializes a RichTextEditorValue instance for property value storage.
Declaration
public static string SerializeRichTextEditorValue(RichTextEditorValue richTextEditorValue, IJsonSerializer jsonSerializer)
Parameters
Type | Name | Description |
---|---|---|
RichTextEditorValue | richTextEditorValue | The RichTextEditorValue instance to serialize. |
IJsonSerializer | jsonSerializer | The system JSON serializer. |
Returns
Type | Description |
---|---|
System.String | A string value representing the passed RichTextEditorValue instance. |
TryParseRichTextEditorValue(Object, IJsonSerializer, ILogger, out RichTextEditorValue)
Attempts to parse a RichTextEditorValue instance from a property value.
Declaration
public static bool TryParseRichTextEditorValue(object value, IJsonSerializer jsonSerializer, ILogger logger, out RichTextEditorValue richTextEditorValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The property value. |
IJsonSerializer | jsonSerializer | The system JSON serializer. |
ILogger | logger | A logger for error message handling. |
RichTextEditorValue | richTextEditorValue | The parsed RichTextEditorValue instance, or null if parsing fails. |
Returns
Type | Description |
---|---|
System.Boolean | True if the parsing succeeds, false otherwise |
Remarks
The passed value can be:
- a JSON string.
- a JSON object.
- a raw markup string (for backwards compatability).