X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fhorizontalrule%2Fplugin.js;h=618ebaa2af0dad3a919e76f6f84ec560eb688715;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hp=7d8bde2be2cb7353cae2f70303f2520c70ee71e9;hpb=2f22c0c38f17e75be5541089076885442aaa2377;p=ckeditor.git diff --git a/_source/plugins/horizontalrule/plugin.js b/_source/plugins/horizontalrule/plugin.js index 7d8bde2..618ebaa 100644 --- a/_source/plugins/horizontalrule/plugin.js +++ b/_source/plugins/horizontalrule/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2012, 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(); } };