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.
Unfortunately, activation email could not send to your email. Please try again.

Search and replace in Rich Text Editor

Thread ID:

Created:

Updated:

Platform:

Replies:

118061 Jan 26,2015 09:38 PM Jan 28,2015 09:05 AM ASP.NET MVC 3
loading
Tags: RichTextEditor
duyvt
Asked On January 26, 2015 09:38 PM

Hi all,
The content of my RTE is as below:
«Select:Referring MD»   «EndSelect»


I have two questions:
1. Can I search/replace text in Rich Text Editor ? For example, I want to search [date] and replace by current day. 
2. Can I select each character in content from the beginning to the end. For example
Step 1: select "["
Step 2: select "d"
Step 3: select "a"
Step 4: select "t"
....
Is there anyone who can help me ?
Thanks and best regards,

Kaliswaran Shanmuga Sundaram [Syncfusion]
Replied On January 27, 2015 08:34 AM

Hi Duyvt,

Thanks for using Syncfusion products.

Query: “Can I search/replace text in Rich Text Editor ? For example, I want to search [date] and replace by current day. Can I select each character in content from the beginning to the end”.

Currently in our RTE there is no built-in option is available to achieve your requirement. But we can achieve it in the sample level.

We can achieve your requirement by using a API called “customTools” present inside the “tools ” API. It is used to define our custom action. In that we need to define the button component for find and replace option. In the click event of button component we need handle the find and replace function.

Please refer following JS customTools sample for more detailed information.

http://js.syncfusion.com/demos/web/#!/azure/rte/customtool

If you need of a sample for this function, please let us know. We are ready to provide the custom sample at earliest.

Please let us know if you have further queries.

Regards,

Kaliswaran S

duyvt
Replied On January 27, 2015 09:07 PM

Thanks for quick reply,

I can add "Find/Replace" button into toolbar. But I don't know the way to handle the find and replace function. Could you please give me an example.

Thanks,  

Kaliswaran Shanmuga Sundaram [Syncfusion]
Replied On January 28, 2015 09:05 AM

Hi Duyvt,

Thanks for your update.

Query : I can add "Find/Replace" button into toolbar. But I don't know the way to handle the find and replace function. Could you please give me an example.

We have prepared the sample based on your requirement. You can also download the attached sample from the following location.

Sample Location : RTE-Sample

In the above sample, we have used our Rich Text Editor “customTool” API to handle the find and replace action. By using “customTool” API we have created a button like “Find”. In the button click event we have called the find and replace function.

Please let me know if you have further queries in the provided sample or any other further enhancement in the sample.

Regards,

Kaliswaran S

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.

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.

;