Example of Enter Key Configuration in Blazor Rich Text Editor Component
This sample demonstrates the APIs to customize the Enter and Shift + Enter key actions in the Rich Text Editor. Code view shows the HTML source of the Rich Text Editor content, and it is updated as you type in the editor.
<p>In Rich text Editor, the Enter key and Shift + Enter key actions can be customized using the EnterKey and ShiftEnterKey properties. The possible values are as follows:</p><ul><li> P - When 'P' is configured, pressing enter or shift + enter will create a 'p' tag</li><li>DIV - When 'DIV' is configured, pressing enter or shift + enter will create a 'div' tag</li><li>BR - When 'BR' is configured, pressing enter or shift + enter will create a 'br' tag</li></ul>
The following properties are used to customize the key actions,
EnterKey
- To change the tag of Enter key action. In this demo, change the value of Enter key dropdown to customize the Enter key tag.ShiftEnterKey
- To change the tag pf Shift + Enter key action. In this demo, change the value of Shift + Enter key dropdown to customize the Shift + Enter key tag.