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

Prevent/remove residual HTML markup

1 Answer 51 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Bartski
Top achievements
Rank 1
Bartski asked on 08 Mar 2011, 12:53 PM

User love to cut and paste from here and there. apply and reapply font styles etc.

This continuously leaves residual html, what for the user results in ‘strange behavior’.


Is there some way to clean or prevent this? From the editor except from going in the source?

1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 08 Mar 2011, 03:55 PM
Hello Bartski,

You can create a custom content filter and remove all the elements which are unnecessary in your particular case. Review the following online help article: http://www.telerik.com/help/aspnet-ajax/editor-content-filters.html .

Probably in your case the filter should be DOM. So in the declaration of the filter use this.set_isDom(true);. This way the arguments of the getHtmlContent and getDesignContent methods will be the content area of the editor and you will be able to use dom functionality to get the unnecessary elements.


Kind regards,
Stanimir
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
WebParts for SharePoint
Asked by
Bartski
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or