replace "on the fly"

Hello,

I am looking for a way to do a substitution while writing. Example: the user writes # greet-tab and '#greet' is replaced with 'best regards, yours'. -tab means: the user clicks the tab-button on his keyboard

thanks, Otto

5 Replies 1 reply marked as answer

SM Suriya Murugan Syncfusion Team January 4, 2021 12:44 PM UTC

Hi Otto, 
 
Syncfusion Greetings! 
 
You can use findAll and insertText API in DocumentEditor to replace text. To detect Tab Key, you can OnKeyDown Event Args in DocumentEditor. 
 
## Find All 
 
 
## Replace 
 
container.GetEditor().InsertText("Hello"); 
 
 
## KeyDown 
 
Documentation in Typescript: Can you please check it and let us know if you statisfies with this and we will provide sample for your requirement. 
 
 
 
Regards, 
 
Suriya M. 


Marked as answer

CF Chad Foster February 9, 2024 07:37 PM UTC

Hi -- apologies if I shouldn't be replying on an old (and someone elses) post.

With ej2 link you supplied I see the following: "

documentEditor.keyDown

However, I don't see a keydown method in Blazor's version of the documentEditor. Is there a way to do this with Blazor's Syncfusion Word Processor control?


Thanks



KM Kavitha Muralitharan Syncfusion Team February 12, 2024 06:02 PM UTC

Chad, currently, we are checking and will get back to you by February 14, 2024.



CF Chad Foster February 17, 2024 08:42 PM UTC

Hi, were you able to look into this?


Cheers,

Chad Foster



KM Kavitha Muralitharan Syncfusion Team February 19, 2024 05:05 PM UTC

Chad, we suggest that you refer to the documentation below for information about the keydown event.

UG Documentation

https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.DocumentEditorKeyDownEventArgs.html


Loader.
Up arrow icon