We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

textchange event is not firing

Thread ID:

Created:

Updated:

Platform:

Replies:

151183 Feb 3,2020 07:52 AM UTC Feb 6,2020 03:52 AM UTC Angular - EJ 2 3
loading
Tags: Diagram
RakhiS
Asked On February 3, 2020 07:52 AM UTC

Hi,
I want to get the current text and also the new text which is being added, and for this I am using textchangeproperty in the following manner:
HTML:
 <ejs-diagram #diagram id="diagram" width="100%" height="700px"  textChange="textchange()"></ejs-diagram>
         
COMPONENT.TS:
textChange(args: ITextEditEventArgs) {
    alert("abc");
  }

but is not calling when I start editing text of node on double clicking nor at the finish editing.

Please help!

Shyam G [Syncfusion]
Replied On February 4, 2020 04:27 AM UTC

Hi Rakhi, 
 
There is no textChange event in the diagram control. Please use textEdit event which triggers once you edit the text and focus out of the text area. In this event, we get a new and the old text in the newValue and oldValue property respectively. Please refer to a help documentation, code example and the sample below. 
 

Code example: 
<ejs-diagram #diagram id="diagram" width="100%" height="700px    (textEdit)="textEdit($event)"
</ejs-diagram> 

  textEdit(args:ITextEditEventArgs) { 
     //get a new text and old text 
     console.log(args.newValue); 
     console.log(args.oldValue); 
 



 
Regards, 
Shyam G 


RakhiS
Replied On February 5, 2020 06:22 AM UTC

Hi Rakhi, 
 
There is no textChange event in the diagram control. Please use textEdit event which triggers once you edit the text and focus out of the text area. In this event, we get a new and the old text in the newValue and oldValue property respectively. Please refer to a help documentation, code example and the sample below. 
 

Code example: 
<ejs-diagram #diagram id="diagram" width="100%" height="700px    (textEdit)="textEdit($event)"
</ejs-diagram> 

  textEdit(args:ITextEditEventArgs) { 
     //get a new text and old text 
     console.log(args.newValue); 
     console.log(args.oldValue); 
 



 
Regards, 
Shyam G 


Thanks,
It worked for me!

Shyam G [Syncfusion]
Replied On February 6, 2020 03:52 AM UTC

Hi Rakhi, 
Thanks for your update. 
Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon