Problem accessing active richtextnode text

Hi, I am facing a problem with richtextnodes
I add a richtextnode and while I still typing in the richtextnode I click on Save button
As you can see in the image I don't have access to the already typed info

Can I somehow workaround this?


Attachment: ActiveNodeProblem_cc9a8e6d.7z

2 Replies

GE George October 2, 2019 10:29 PM UTC

Another question, can I predefined the richtextNode font (family, size etc)?


SG Shyam G Syncfusion Team October 4, 2019 10:02 AM UTC

Hi George, 
 
Query 
Response 
I add a richtextnode and while I still typing in the richtextnode I click on Save button
As you can see in the image I don't have access to the already typed info
 
Please use TextEditor TextChanged event which triggers when we enter a text in richtexteditor. Please refer to a code example to define event. 
 
Code example: 
 
this.diagram1.Controller.TextEditor.TextChanged += TextEditor_TextChanged; 
 
private void TextEditor_TextChanged(object sender EventArgs e) { 
 
} 
Another question, can I predefined the richtextNode font (family, size etc)?  
Yes, you can predefined the richtextNode font using the below code example. 
 
Code example: 
 
RichTextNode richTextNode = new RichTextNode("{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold } text.\par}", 
                                              new RectangleF(NodeX, 
                                                             NodeY, 
                                                             NodeWidth, 
                                                             NodeHeight)); 
 
 
Regards, 
Shyam G 


Loader.
Up arrow icon