Making "Paste from Word" the default paste?

Last post 01-10-2005, 10:59 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  01-05-2005, 11:53 AM 3276

    Making "Paste from Word" the default paste?

    Hi,

    For accessibility reasons, I'd like to be able to make "Paste from Word" the default paste operation. I can't find an option for this, and although I can remove the "Paste" and "Paste from Text" buttons from the toolbar of the editor, using the CTRL-V keyboard shortcut still results in a normal "Paste". I'd hoped to use a hotkey in the toolbar configuration to override the default paste operation, but I can't find any documentation on the available hotkey names - obviously "CtrlV" doesn't work in this snippet from my .config...

    <toolbars>
        ...
        <item type="image" imagename="Paste" name="PasteWord" hotkey="CtrlV"/>
        ...
    </toolbars>

    Is this possible, or could you suggest an alternative solution to the CTRL-V problem?


    Thanks,
    --Tim

  •  01-05-2005, 5:29 PM 3287 in reply to 3276

    Re: Making "Paste from Word" the default paste?

    Hi Tim,
     
    Can you wait for the version 4.0.0.3?
     
    In the next minor version, we will resolved this issue.
     
    We will release the new version within 10 days.
     
    Below is a alternative solution (disable the CTR + V)
     
    Disable the CTR + V
    <script>
    function test () {
        var editor1=document.getElementById('<%=Editor1.ClientID%>');
        var editdoc = editor1.GetDocument();
        editdoc.body.onpaste=helloworld;
    }
    function helloworld() {
        window.clipboardData.clearData();
    }
    </script>
    <body onload="test()">

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-06-2005, 3:57 AM 3295 in reply to 3287

    Re: Making "Paste from Word" the default paste?

    Hi Adam,

    Thanks very much for the workaround. 10 days is within my development window for this, so I can wait for 4.0.0.3.

    Thanks,
    --Tim

  •  01-10-2005, 10:59 PM 3372 in reply to 3295

    Re: Making "Paste from Word" the default paste?

    Tim,

    This feature request has already been added to CE version 4.0.0.3

    Editor.EditorOnPaste Property

    Specifies the manner in which the editor handles pasted text.
     

    PasteBehavior Enumeration

    Enumerates the manners in which the editor handles pasted text.

    Members:

    Member Name

    Description
    DefaultWhen you paste text into the editor it is not processed.
    DisabledPaste function is disabed.
    PasteWordWhen you pasting the content from Word into the editor, the non-required code that usually comes with pasting from Word are automatically cleaned up.
    PasteTextWhen you paste text into the editor, all HTML formatting is stripped. This option is ideal for content management systems where you want absolute control over the formatting
    ConfirmWordWhen you pasting the content from Word into the editor, will prompt users with a popup prompt to clean the non-required code.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML