﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12789	forcePasteAsPlainText strips inline widget html when dropping	Brian Mahler		"If you have an inline widget with html in the template.  When you drag and drop it, the surrounding html is stripped from the widget.  I was able to fix this by modifying the widget plugin.js to work like the pastefromword plugin.  Here are my modifications.


	function finalizeNativeDrop( editor, sourceWidget, range ) {
		// Save the snapshot with the state before moving widget.
		// Focus widget, so when we'll undo the DnD, widget will be focused.
		sourceWidget.focus();
		editor.fire( 'saveSnapshot' );

		// Lock snapshot to group all steps of moving widget from the original place to the new one.
		editor.fire( 'lockSnapshot', { dontUpdate: true } );

		range.select();

		var widgetHtml = sourceWidget.wrapper.getOuterHtml();
		sourceWidget.wrapper.remove();
		editor.widgets.destroy(sourceWidget, true);
	        '''editor.once('beforePaste', function(evt) {
	            '''evt.data.type = 'html';
	        '''});

		editor.execCommand( 'paste', widgetHtml );

		editor.fire( 'unlockSnapshot' );
	}
"	Bug	closed	Normal		UI : Widgets	4.3	duplicate		
