刪除CKEditor 連結與圖片視窗的其它Tab

刪除CKEditor 連結與圖片視窗的其它Tab

	CKEDITOR.on( 'dialogDefinition', function( ev )
	   {
	      var dialogName = ev.data.name;
	      var dialogDefinition = ev.data.definition;
	      ev.data.definition.resizable = CKEDITOR.DIALOG_RESIZE_NONE;

	      if ( dialogName == 'link' )

	      {
	         var infoTab = dialogDefinition.getContents( 'info' );
	         infoTab.remove( 'protocol' );
	         dialogDefinition.removeContents( 'upload' );
	         dialogDefinition.removeContents( 'target' );
	         dialogDefinition.removeContents( 'advanced' );
	      }

	      if ( dialogName == 'image' )
	      {
	      	 dialogDefinition.removeContents( 'Upload' );
	         dialogDefinition.removeContents( 'Link' );
	         dialogDefinition.removeContents( 'advanced' );
	         var infoTab = dialogDefinition.getContents( 'info' );
	         infoTab.remove( 'txtBorder' );
	         infoTab.remove( 'txtHSpace' );
	         infoTab.remove( 'txtVSpace' );
	         infoTab.remove( 'cmbAlign' );
	      }
	   });

本人實測過解決方案

http://ckeditor.com/forums/Support/How-remove-Element-particular-Tab

並加入一些刪除上傳Tab的部分。

程式碼為完整可行內容。