X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fhorizontalrule%2Fplugin.js;h=bdf94531af42effcefd1327ba6c4568544bfb09a;hp=7d8bde2be2cb7353cae2f70303f2520c70ee71e9;hb=6e682412d5cc0dfaedb376482e585bf2989c6863;hpb=2f22c0c38f17e75be5541089076885442aaa2377 diff --git a/_source/plugins/horizontalrule/plugin.js b/_source/plugins/horizontalrule/plugin.js index 7d8bde2..bdf9453 100644 --- a/_source/plugins/horizontalrule/plugin.js +++ b/_source/plugins/horizontalrule/plugin.js @@ -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(); } };