Completed
Last Updated: 07 Aug 2015 07:29 by ADMIN
ADMIN
Ianko
Created on: 16 Dec 2014 09:52
Category: Editor
Type: Bug Report
0
Using Paste tool in Editor triggers a paste command with an empty command name under IE
Handling the OnClientPasteHtml event of the editor cannot be used properly, because the logic cannot rely on the command name to further interact with pasted content.

For the time being you can use the following script to workaround the issue:

<telerik:RadEditor runat="server" ID="RadEditor1">
</telerik:RadEditor>

<script type="text/javascript">
	Telerik.Web.UI.Editor.CommandList.PastePlainTextWithTable = function (commandName, editor, args) {
		if (editor.get_lockFormatting && !editor.get_lockFormatting())
			return;

		if ($telerik.isIE) {
			var restorePoint = editor.createRestorePoint(),
				utils = Telerik.Web.UI.Editor.Utils,
				dirtyText = utils.getClipboardAsHtml(editor),
				cleanedText = utils.cleanPastedContent(dirtyText,
				editor.get_stripFormattingOptions(),
				editor.get_localization()["askwordcleaning"], false);

			restorePoint.select();
			editor.pasteHtml(cleanedText, args.get_commandName());
		}
	};
</script>
0 comments