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

manually call methods on a contentfilter

1 Answer 40 Views
Editor
This is a migrated thread and some comments may be shown as answers.
marketwire
Top achievements
Rank 1
marketwire asked on 24 Feb 2012, 10:04 PM
Hello,
I was wondering if it's possible to pass in a custom string to get_html() in order to run the filters on what I pass in. Our project works with individual paragraphs (instead of entire content) so I'd like to push their html through the filters either by string or element reference. Preferably run all the enabled filters at the same time, or if that's not possible, call the getHtmlContent method on each filter.

Thanks

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Feb 2012, 02:11 PM
Hello,

Yes, you should call the getHtmlContent of each filter to correct the specified content. Here is an example:

var filter = editor.get_filtersManager().getFilterByName("ConvertCharactersToEntities");
var newContent = filter.getHtmlContent(oldContent));  


Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
marketwire
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or