Articles in this section
Category / Section

How to enable annotation edit mode in ASP.NET Core Diagram?

2 mins read

To enable annotation edit mode after a node is dropped from the symbol palette onto the ASP.NET Core Diagram, you can follow these steps:

Configure the Drop Event:

• Handle the drop event, which is triggered when an element is dropped from the symbol palette to the diagram canvas.

Call the startTextEdit Method:

• Within the drop event handler, call the startTextEdit method of the diagram.
• The startTextEdit method initiates the editing mode for the associated annotation of the dropped node or connector.
• This allows users to directly modify the text of the dropped node or connector.

Refer to the code sample of the above steps:

<ejs-diagram id="diagram" width="100%" height="469px" getnodedefaults="@ViewBag.getNodeDefaults" drop="dropFn" getconnectordefaults="@ViewBag.getConnectorDefaults" nodes="ViewBag.Nodes" connectors="ViewBag.Connectors" created="fitToPage">
</ejs-diagram>
function dropFn(args){
 var diagram = document.getElementById("diagram").ej2_instances[0];
 diagram.startTextEdit();
}

Conclusion
I hope you enjoyed learning about how to enable annotation edit mode after dropping a node from the palette to the ASP.NET Core Diagram canvas.

You can refer to our ASP.NET Core Diagram feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our ASP.NET Core Diagram example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

start text Edit.zip
Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied