Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
- .NET API Reference
- JavaScript API Reference
- EO.Web
- EO.Web
- Objects
- Global Functions
- Event Handlers
- Event Handlers
- calendar_event_handler
- callback_after_execute_handler
- callback_after_update_handler
- callback_before_execute_handler
- clientside_error_handler
- clientside_evalvar
- clientside_generic_handler
- clientside_message_handler
- contextmenu_handler
- dialog_event_handler
- editablelabel_change_handler
- editor_contextmenu
- editor_paste_handler
- grid_column_beginedit
- grid_column_endedit
- grid_customcolumn_gettext
- grid_itemcommand_handler
- grid_itemevent_handler
- navigator_event_handler
- spellchecker_correct_error_handler
- toolbar_event_handler
- treeview_afterpopulate_handler
- treeview_checkstatechanging_handler
- treeview_dragdrop_handler
- treeview_rename_handler
- uploader_fileselected_handler
- uploader_progress_handler
- EO.WebEngine
- EO.Web
editor_paste_handler |
Client side event handler for ClientSideOnPaste event.
Note: This is a prototype, not a function. You should provide a function that matches this prototype if you wish to handle the corresponding event on the client side. The prototype provides information about the arguments and return value of the function you provide.
Parameters
- editor
- The editor that triggers the event.
- text
- The HTML text to be pasted.
- arg
- Additional argument passed in when Editor.execCommand is called.
Use this client side event to provide a JavaScript function to be called when the editor is about to paste text contents. The function can be used to alter the text before it is being pasted.
This function is usually used to perform custom processing on the pasted text. For example, to add a Paste Code button on the toolbar and automatically encloses the pasted text inside a DIV with the DIV's class set to code. This can be achieved by using the following JavaScript function:
function on_toolbar_click_handler(toolBar, toolBarItem) { if (toolBarItem.getCommandName() == "PasteCode") Editor1.execCommand("Paste", null, "code"); } function on_paste_handler(editor, text, arg) { if (format == "code") return "<div class='code'>" + text + "</div>"; return null; }