Example of API in ASP.NET MVC Block Editor Control
This sample demonstrates the usage of API in Block Editor. Use the properties panel to change read-only mode, enable/disable drag and drop, enable HTML encode, get JSON data, get block count, select all blocks, and control focus.
DEMO
SOURCE
|
ReadOnly
|
|
|
Enable Drag and Drop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In this demo, you can explore the API behaviors by:
- Click the
readOnlycheckbox to enable/disable editable and non-editable mode of the Block Editor. - Click the
enableDragDropcheckbox to enable/disable drag and drop functionality. - Click the
getJsonDatabutton to display the focused block JSON data in an alert window. - Click the
getHtmlDatabutton to display the editor content as HTML in an alert window. - Click the
getBlockCountbutton to display the total number of blocks in an alert window. - Click the
selectAllBlocksbutton to select all content in the editor. - Click the
focusInbutton to focus the editor. - Click the
focusOutbutton to remove focus from the editor. - Click the
printbutton to preview the content before printing from the editor.