How to enable annotation edit mode after dropping a node from the palette to the Angular Diagram canvas?
This article explains how to enable annotation edit mode after dropping a node from the palette onto the Angular Diagram canvas. To enable annotation edit mode after a node is dropped from the symbol palette onto the Angular Diagram, 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 #diagram id="diagram" width="95%" height="100%" (drop)="drop($event)" (created)="created()">
</ejs-diagram>
public drop(arg: IDragEnterEventArgs): void {
this.diagram.startTextEdit();
}
Refer to the working sample for additional details and implementation:Sample
Conclusion
We hope you enjoyed learning about how to enable annotation edit mode after dropping a node from the palette to the diagram canvas.
You can refer to our Angular Diagram feature tour page to learn about its other groundbreaking feature representations. You can explore our Angular Diagram documentation to understand how to present and manipulate data.
For current customers, you can check out our Angular 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 Angular Diagram and other Angular components. 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, BoldDesk Support, or feedback portal. We are always happy to assist you!