Merge pull request #5845 from Amazing-Software-Solutions/dev

Added Style Paramater to RichTextEditor
This commit is contained in:
Shaun Walker
2025-12-01 15:45:17 -05:00
committed by GitHub

View File

@@ -7,7 +7,7 @@
@inject ISettingService SettingService @inject ISettingService SettingService
@inject IStringLocalizer<RichTextEditor> Localizer @inject IStringLocalizer<RichTextEditor> Localizer
<div class="row" style="margin-bottom: 50px;"> <div class="row" style="@_style">
<div class="col"> <div class="col">
@_textEditorComponent @_textEditorComponent
</div> </div>
@@ -18,6 +18,8 @@
private RenderFragment _textEditorComponent; private RenderFragment _textEditorComponent;
private ITextEditor _textEditor; private ITextEditor _textEditor;
private string _style = "margin-bottom: 50px;";
[Parameter] [Parameter]
public string Content { get; set; } public string Content { get; set; }
@@ -30,6 +32,9 @@
[Parameter] [Parameter]
public string Provider { get; set; } public string Provider { get; set; }
[Parameter]
public string Style { get; set; } // optional
[Parameter(CaptureUnmatchedValues = true)] [Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> AdditionalAttributes { get; set; } = new Dictionary<string, object>(); public Dictionary<string, object> AdditionalAttributes { get; set; } = new Dictionary<string, object>();
@@ -40,6 +45,12 @@
protected override void OnParametersSet() protected override void OnParametersSet()
{ {
if (!string.IsNullOrEmpty(Style))
{
_style = Style;
}
_textEditorComponent = (builder) => _textEditorComponent = (builder) =>
{ {
CreateTextEditor(builder); CreateTextEditor(builder);