manually call methods on a contentfilter

2 posts, 0 answers
  1. marketwire
    marketwire avatar
    1 posts
    Member since:
    Mar 2009

    Posted 24 Feb 2012 Link to this post

    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.

  2. Rumen
    Rumen avatar
    14474 posts

    Posted 28 Feb 2012 Link to this post


    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));  

    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.
Back to Top