mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
Change the implementation of NoTools and rename it to ShowToolbar.
This commit is contained in:
@@ -7,13 +7,15 @@
|
||||
@if(Visible)
|
||||
{
|
||||
<div @ref=Element style=@Style @attributes=@Attributes class=@GetCssClass() id=@GetId()>
|
||||
@if (ShowToolbar)
|
||||
{
|
||||
<div class="rz-html-editor-toolbar">
|
||||
<CascadingValue Value=@this>
|
||||
@if (ChildContent != null)
|
||||
{
|
||||
@ChildContent
|
||||
}
|
||||
else if (!NoTools)
|
||||
else
|
||||
{
|
||||
<RadzenHtmlEditorUndo />
|
||||
<RadzenHtmlEditorRedo />
|
||||
@@ -51,6 +53,7 @@
|
||||
}
|
||||
</CascadingValue>
|
||||
</div>
|
||||
}
|
||||
<RadzenTextArea @ref=@TextArea spellcheck="false" Visible=@(mode == HtmlEditorMode.Source) class="rz-html-editor-source" Value=@Html Change=@SourceChanged />
|
||||
<div hidden="@(mode != HtmlEditorMode.Design)" @ref=@ContentEditable class="rz-html-editor-content" contenteditable=@(!Disabled) @onfocus=@OnFocus @onblur=@OnBlur></div>
|
||||
</div>
|
||||
|
||||
@@ -19,10 +19,10 @@ namespace Radzen.Blazor
|
||||
public partial class RadzenHtmlEditor : FormComponent<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows for no-tool HTML editors.
|
||||
/// Specifies whether to show the toolbar. Set it to false to hide the toolbar. Default value is true.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool NoTools { get; set; } = false;
|
||||
public bool ShowToolbar { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the mode of the editor.
|
||||
|
||||
Reference in New Issue
Block a user