Hello Telerik Support Team.
I'm using dll 2014.1.403.40 version.
I would like to prevent pasting image into editor from web browser copy on context menu.
I had seen your editor demo here (http://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx)
Demo is working good for blocking any pasting image by Control+V or paste on context menu.
I implemented sample project using your demo source unfortunately it does not work!!!!!!!!!!.
My test procedure is here.
1. Right click on the image in IE browser (That will shows browser context menu)
2. Click "Copy"
3. Pasting image into editor by pressing Control + V
4. Editor shows pasted image. (<--- Your demo is not shows image)
What is the problem? I need to same feature like your demo.
I'm attaching my sample project thank you.
ASPX:
01.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
02.
03.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
04.
05.
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
06.
<
head
runat
=
"server"
>
07.
<
title
></
title
>
08.
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
/>
09.
</
head
>
10.
<
body
>
11.
<
form
id
=
"form1"
runat
=
"server"
>
12.
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
13.
<
Scripts
>
14.
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
15.
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
16.
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
17.
</
Scripts
>
18.
</
telerik:RadScriptManager
>
19.
<
script
type
=
"text/javascript"
>
20.
//Put your JavaScript code here.
21.
function OnClientSubmit(sender, args) {
22.
sender.fire("FormatStripper", { value: "WORD" });
23.
}
24.
</
script
>
25.
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
26.
</
telerik:RadAjaxManager
>
27.
<
div
>
28.
<
telerik:RadEditor
runat
=
"server"
OnClientSubmit
=
"OnClientSubmit"
ID
=
"RadEditor1"
29.
SkinID
=
"BasicSetOfTools"
Width
=
"420px"
Height
=
"300px"
EnableResize
=
"false"
>
30.
<
Content
>
31.
<
p
class
=
"MsoNoSpacing"
style
=
"margin: 0in 0in 0pt;"
><
span
class
=
"MsoIntenseEmphasis"
style
=
"color: #4f81bd;"
><
strong
><
em
><
span
style
=
"font-family: calibri;"
> <
br
/>
32.
Experiment with the various options of the StripFormattingOptions setting for cleaning Word formatting.</
span
></
em
></
strong
></
span
></
p
>
33.
<
p
class
=
"MsoNoSpacing"
style
=
"margin: 0in 0in 0pt;"
><
span
class
=
"MsoIntenseEmphasis"
><
strong
><
em
><
span
style
=
"color: #4f81bd; font-family: calibri;"
>
34.
The content here has MS Word formatting which you can strip on submit by clicking on the "Submit and Clean" button above.<
o:p
></
o:p
></
span
></
em
></
strong
></
span
></
p
>
35.
</
Content
>
36.
</
telerik:RadEditor
>
37.
</
div
>
38.
</
form
>
39.
</
body
>
40.
</
html
>
CS:
01.
using System;
02.
using System.Web;
03.
using System.Web.UI;
04.
using System.Web.UI.WebControls;
05.
06.
using System.Data;
07.
using System.Configuration;
08.
using System.Web.Security;
09.
using System.Web.UI.WebControls.WebParts;
10.
using System.Web.UI.HtmlControls;
11.
using Telerik.Web.UI;
12.
13.
public partial class Default : System.Web.UI.Page
14.
{
15.
protected void Page_Load(object sender, EventArgs e)
16.
{
17.
if (!IsPostBack)
18.
{
19.
20.
RadEditor1.StripFormattingOptions = EditorStripFormattingOptions.All;
21.
22.
}
23.
}
24.
}