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

[Solved] Content Filters cant apply to View?

3 Answers 62 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Grayson Mitchell
Top achievements
Rank 1
Grayson Mitchell asked on 14 Jul 2009, 04:24 AM
I followed the tutorial on how to write a content filter (between Design & HTML) but there does not seem to be a way to apply one to the view mode?

I want to be able to apply some rules to the view, and then go back to my design retaining the original values

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Jul 2009, 12:26 PM
Hi Grayson,

You can achieve your scenario by attaching to the editor's OnClientModeChange event property and checking for the Preview mode. After that you can manipulate the content in the DOM using the editor.get_document() method.

You can see the following KB article for more information on the subject:
Applying external stylesheet to the content of RadEditor in Preview mode.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Grayson Mitchell
Top achievements
Rank 1
answered on 14 Jul 2009, 09:34 PM
Thanks Rumen,
Unfortunatly css is presentation only, and I want to change the content.

What I am currently looking at is having two editor controls (edit & preview), and when I change modes I make one's display = 'none'.  This approach seems to work so far here is a link to the code:

http://www.telerik.com/community/forums/aspnet-ajax/editor/copy-content-updates-another-control.aspx#882196

Regards
Grayson
0
Rumen
Telerik team
answered on 15 Jul 2009, 02:14 PM
Hi Grayson,

The code that you have posted in the forum looks OK and you can use it.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Grayson Mitchell
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Grayson Mitchell
Top achievements
Rank 1
Share this question
or