This is a migrated thread and some comments may be shown as answers.

Overwrite Preview Mode

1 Answer 55 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Stephan
Top achievements
Rank 1
Stephan asked on 12 Oct 2015, 11:31 AM

Hi,

 I'm trying to use the Editor to give my users the ability to write a custom message template for an application, that will send notification upon certain events.

 

To give the users the ability to customize the notification-message, I'd like to have replaceable codes in the editor. Something like {User}, that will be replaced in the actual message with the current users name. The Editors Content is saved with these Codes and my application replaces the tags, when the message is sent.

 

Is it possible to change the Preview-Mode of the Editor, so I can replace this codes with data, so the user sees how the message will look like?

 

To summarize: Is it possible to change the content shown in the preview mode?

 

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Accepted
Ianko
Telerik team
answered on 13 Oct 2015, 05:56 AM
Hi Stephan,

You can change the content inside RadEditor by using the modeChange event—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/client-side-programming/events/onclientmodechange

You can also see the get_html() and set_html() methods:

Regards,

Ianko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Editor
Asked by
Stephan
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or