|
window.RichTextEditor = {
onCreated: function () {
RTEContent = document.querySelector('.e-richtexteditor .e-rte-content .e-content');
RTEContent.addEventListener('keyup', function (args) {
if (args.keyCode === 13 && args.key === "Enter") {
//Peform your enter key action
}
});
}
} |
|
<head>
...
...
<script src="~/jsinterop.js"></script>
</head> |
|
@using Syncfusion.Blazor.RichTextEditor
<SfRichTextEditor>
<RichTextEditorEvents Created="@onCreated"></RichTextEditorEvents>
<p>Rich Text Editor allows to insert images from online source as well as local computer where you want to insert the image in your content.</p>
<p><b>Get started Quick Toolbar to click on the image</b></p>
<p>It is possible to add custom style on the selected image inside the Rich Text Editor through quick toolbar.</p>
</SfRichTextEditor>
@functions
{
[Inject]
IJSRuntime JsRuntime { get; set; }
public void onCreated()
{
JsRuntime.InvokeAsync<string>("RichTextEditor.onCreated");
}
}
|
|
<SfRichTextEditor SaveInterval=1 @bind-Value="@EditorText" >
<RichTextEditorEvents Created="@onCreated" ></RichTextEditorEvents>
</SfRichTextEditor>
|
|
<SfRichTextEditor SaveInterval=1>
<RichTextEditorEvents Created="@onCreated" ></RichTextEditorEvents>
<p>Rich Text Editor allows to insert images from online source as well as local computer where you want to insert the image in your content.</p>
<p><b>Get started Quick Toolbar to click on the image</b></p>
<p>It is possible to add custom style on the selected image inside the Rich Text Editor through quick toolbar.</p>
</SfRichTextEditor>
|