HtmlEditorHtmlEditingSettings.ProcessRtfContentPastingOnServer Property
Gets or sets a value that specifies whether to process the copied/cut RTF content on the server side.
Namespace: DevExpress.Web.ASPxHtmlEditor
Assembly: DevExpress.Web.ASPxHtmlEditor.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | true |
|
Remarks
To paste the RTF content from a clipboard with the original formatting, set the ProcessRtfContentPastingOnServer property to true
. It enables converting the RTF content to HTML on the server and then paste it to the editor.
<dx:ASPxHtmlEditor runat="server">
<SettingsHtmlEditing ProcessRtfContentPastingOnServer="true"></SettingsHtmlEditing>
</dx:ASPxHtmlEditor>
The time the RTF content is processed on the server, a loading panel with the temporary HTML content is shown in the editor. The following example illustrates how to obtain the temporary HTML.
function onBeforePaste(s, e) {
if(e.html.indexOf('id="dx-tmpRtf') > -1)
alert("The temporary content will be pasted.");
else
alert("Default behavior.");
}
Settings for images from the RTF content are specified by the HtmlEditorDefaultDialogSettings.InsertImageDialog property (provided that the ASPxHtmlEditorSettings.AllowSaveBinaryImageToServer property is set to true
).
<SettingsDialogs>
<InsertImageDialog>
<SettingsImageUpload UploadStorage="...">
</SettingsImageUpload>
</InsertImageDialog>
</SettingsDialogs>
Note that with the enabled ProcessRtfContentPastingOnServer property, the ASPxClientHtmlEditor.BeforePaste and ASPxClientHtmlEditor.HtmlChanged client events are raised both before and after the content processing.
Known Limitations
- Microsoft Edge does not provide access to the RTF content in clipboard.
- The ProcessRtfContentPastingOnServer property is not in effect if the ASPxHtmlEditorHtmlEditingSettings.PasteMode property is set to HtmlEditorPasteMode.PlainText and the ASPxHtmlEditorHtmlEditingSettings.EnablePasteOptions is disabled.
- The ProcessRtfContentPastingOnServer property is not in effect if the copied/cut content doesn’t contain raw text/rtf data.