-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add
IsTouched
event callback (#24)
Fixes: #24
- Loading branch information
1 parent
47ca3a2
commit d73191b
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...lgebees.Blazor.RichTextEditor.Samples.Shared/Examples/IsTouchedEventCallbackExample.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div> | ||
<h3> | ||
<code class="hljs">IsTouched</code> event callback example | ||
</h3> | ||
<CodeSnippet Code="@Code"> | ||
<Component> | ||
<CodeSnippet Code="@_content" | ||
CodeFormat="CodeFormat.Html" | ||
Summary="Show HTML"> | ||
<Component> | ||
<RichTextEditor @bind-Content="@_content" | ||
IsTouchedChanged="(value => _isTouched = value)" /> | ||
|
||
<div class="container items-center border-2 border-dashed border-stone-500 p-4 mt-2"> | ||
@((MarkupString)_isTouchedContent) | ||
</div> | ||
</Component> | ||
</CodeSnippet> | ||
</Component> | ||
</CodeSnippet> | ||
</div> | ||
|
||
@code { | ||
private const string Code = | ||
@"<RichTextEditor @bind-Content=""@_content"" | ||
IsTouchedChanged=""@(value => _isTouched = value)"" />"; | ||
private string _content = "<b>Have I been touched? \ud83d\ude48</b>"; | ||
|
||
private bool _isTouched; | ||
private string _isTouchedContent => $"<p>Have I been touched? <strong>{_isTouched}</strong></p>"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters