瀏覽代碼

Merge pull request #15 from ckeditor/t/14

Fix: Aligned use of converter to the latest API. Closes #14.
Oskar Wróbel 8 年之前
父節點
當前提交
99858191ac
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      packages/ckeditor5-clipboard/src/clipboard.js

+ 1 - 3
packages/ckeditor5-clipboard/src/clipboard.js

@@ -135,9 +135,7 @@ export default class Clipboard extends Plugin {
 				// Convert the pasted content to a model document fragment.
 				// Convertion is contextual, but in this case we need an "all allowed" context and for that
 				// we use the $clipboardHolder item.
-				const modelFragment = dataController.viewToModel.convert( data.content, {
-					context: [ '$clipboardHolder' ]
-				} );
+				const modelFragment = dataController.toModel( data.content, '$clipboardHolder' );
 
 				doc.enqueueChanges( () => {
 					dataController.insertContent( modelFragment, doc.selection );