@@ -92,7 +92,6 @@ internal class RichTextPropertyValueEditor : BlockValuePropertyValueEditorBase<R
92
92
private readonly HtmlLocalLinkParser _localLinkParser ;
93
93
private readonly RichTextEditorPastedImages _pastedImages ;
94
94
private readonly IJsonSerializer _jsonSerializer ;
95
- private readonly IBlockEditorElementTypeCache _elementTypeCache ;
96
95
private readonly IRichTextRequiredValidator _richTextRequiredValidator ;
97
96
private readonly ILogger < RichTextPropertyValueEditor > _logger ;
98
97
@@ -122,12 +121,12 @@ public RichTextPropertyValueEditor(
122
121
_localLinkParser = localLinkParser ;
123
122
_pastedImages = pastedImages ;
124
123
_htmlSanitizer = htmlSanitizer ;
125
- _elementTypeCache = elementTypeCache ;
126
124
_richTextRequiredValidator = richTextRequiredValidator ;
127
125
_jsonSerializer = jsonSerializer ;
128
126
_logger = logger ;
129
127
130
- Validators . Add ( new RichTextEditorBlockValidator ( propertyValidationService , CreateBlockEditorValues ( ) , elementTypeCache , jsonSerializer , logger ) ) ;
128
+ BlockEditorValues = new ( new RichTextEditorBlockDataConverter ( _jsonSerializer ) , elementTypeCache , logger ) ;
129
+ Validators . Add ( new RichTextEditorBlockValidator ( propertyValidationService , BlockEditorValues , elementTypeCache , jsonSerializer , logger ) ) ;
131
130
}
132
131
133
132
public override IValueRequiredValidator RequiredValidator => _richTextRequiredValidator ;
@@ -340,12 +339,6 @@ private RichTextEditorValue CleanAndMapBlocks(RichTextEditorValue richTextEditor
340
339
}
341
340
342
341
private BlockEditorData < RichTextBlockValue , RichTextBlockLayoutItem > ? ConvertAndClean ( RichTextBlockValue blockValue )
343
- {
344
- BlockEditorValues < RichTextBlockValue , RichTextBlockLayoutItem > blockEditorValues = CreateBlockEditorValues ( ) ;
345
- return blockEditorValues . ConvertAndClean ( blockValue ) ;
346
- }
347
-
348
- private BlockEditorValues < RichTextBlockValue , RichTextBlockLayoutItem > CreateBlockEditorValues ( )
349
- => new ( new RichTextEditorBlockDataConverter ( _jsonSerializer ) , _elementTypeCache , _logger ) ;
342
+ => BlockEditorValues . ConvertAndClean ( blockValue ) ;
350
343
}
351
344
}
0 commit comments