HTML Editor for ASP.NET AJAX Professional Edition
PasteConversion Property
Server ReferenceWinthusiasm.HtmlEditorHtmlEditorPasteConversion
The name of a JavaScript function on the page to call when the editor is converting a paste.
Declaration Syntax
C#
public string PasteConversion { get; set; }
Remarks
The client-side editor will call the named JavaScript function on the page when the editor is converting a paste. This allows the developer to override the conversion, if applicable.

The conversionInfo object passed as an argument contains the following members:

  • option
  • html
  • convertedHtml

The option member contains one of the following values:

  • Normal
  • Text
  • Word
  • Code
  • Html

The developer should modify the conversionInfo.convertedHtml member to override the editor's conversion.

Examples
Set the property declaratively in the HtmlEditor tag:
CopyC#
PasteConversion = "MyPasteConversionHandler"
Page JavaScript function:
CopyC#
function MyPasteConversionHandler(editor, conversionInfo)
{
    if (conversionInfo.option == 'Word')
    {
        conversionInfo.convertedHtml = 
            DoMyWordConversion(conversionInfo.html);
    }
    ...
}

Assembly: Winthusiasm.HtmlEditor (Module: Winthusiasm.HtmlEditor) Version: 2.7.0.0 (2.7.0.0)