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 Rich
Declaration
public static string SerializeRichTextEditorValue(RichTextEditorValue richTextEditorValue, IJsonSerializer jsonSerializer)
Parameters
Type | Name | Description |
---|---|---|
Rich |
richTextEditorValue | The Rich |
IJson |
jsonSerializer | The system JSON serializer. |
Returns
Type | Description |
---|---|
System. |
A string value representing the passed Rich |
TryParseRichTextEditorValue(Object, IJsonSerializer, ILogger, out RichTextEditorValue)
Attempts to parse a Rich
Declaration
public static bool TryParseRichTextEditorValue(object value, IJsonSerializer jsonSerializer, ILogger logger, out RichTextEditorValue richTextEditorValue)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The property value. |
IJson |
jsonSerializer | The system JSON serializer. |
ILogger | logger | A logger for error message handling. |
Rich |
richTextEditorValue | The parsed Rich |
Returns
Type | Description |
---|---|
System. |
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).