Home > DeveloperSection > Forums > TextBox duplicates pasted content
Royce Roy
Royce Roy

Total Post:134

Points:938
Posted on    August-28-2014 1:53 AM

 ASP.Net
Ratings:


 1 Reply(s)
 793  View(s)
Rate this:

I am using a FreeTextBox:

 

<FTB:FreeTextBox ID="txtFreeTextBox" RemoveServerNameFromUrls="false" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu|Bold,Italic,Underline,Strikethrough;Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImageFromGallery,InsertRule,InsertTable|Cut,Copy,Paste;Undo,Redo,Print" runat="Server" Width="100%" BackColor="239,239,240"ImageGalleryUrl="../../ftb.imagegallery.aspx?rif=Public/RootImages/&cif=Public/RootImages/">

</FTB:FreeTextBox>

The problem is that when I paste into it, it pastes it two times. Is there something to solve this?



Sumit Kesarwani

Total Post:378

Points:2694
Posted on    August-28-2014 3:02 AM

Hi Royce, 

<script type="text/javascript">

    FTB_FreeTextBox.prototype.CancelEvent = function (ev) {

        try{

            ev.preventDefault();

            ev.stopPropagation();

        }

        catch (e) {

            if (FTB_Browser.isIE) {

                ev.cancelBubble = true;

                ev.returnValue = false;

            }

        }

    };

</script>


Don't want to miss updates? Please click the below button!

Follow MindStick