Articles in this section

How to enable annotation edit mode in React Diagram?

To enable annotation edit mode after a node is dropped from the symbol palette onto the React 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 onto 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:

 <DiagramComponent id="diagram" ref={diagram => (diagramInstance = diagram)} width={"100%"} height={"560px"}  
   drop={(args) => {
           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 in React Diagram.

You can refer to our React Diagram feature tour page to know about its other groundbreaking feature representations and documentations. You can also explore our React Diagram example to understand how to present 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 React Spreadsheet and other components.

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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied