X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fhorizontalrule%2Fplugin.js;h=618ebaa2af0dad3a919e76f6f84ec560eb688715;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hp=3eac31915ed66cf8655c116c89568eb9da3db6be;hpb=f0610347140239143439a511ee2bd48cb784f470;p=ckeditor.git diff --git a/_source/plugins/horizontalrule/plugin.js b/_source/plugins/horizontalrule/plugin.js index 3eac319..618ebaa 100644 --- a/_source/plugins/horizontalrule/plugin.js +++ b/_source/plugins/horizontalrule/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -14,19 +14,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license canUndo : false, // The undo snapshot will be handled by 'insertElement'. exec : function( editor ) { - var hr = editor.document.createElement( 'hr' ), - range = new CKEDITOR.dom.range( editor.document ); - + var hr = editor.document.createElement( 'hr' ); editor.insertElement( hr ); - - // If there's nothing or a non-editable block followed by, establish a new paragraph - // to make sure cursor is not trapped. - range.moveToPosition( hr, CKEDITOR.POSITION_AFTER_END ); - var next = hr.getNext(); - if ( !next || next.type == CKEDITOR.NODE_ELEMENT && !next.isEditable() ) - range.fixBlock( true, editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); - - range.select(); } };