ソースを参照

After inserting a horizontal rule element, selection will be set on the element.

Kamil Piechaczek 6 年 前
コミット
1aa4f1d55c

+ 1 - 0
packages/ckeditor5-horizontal-line/src/horizontalrulecommand.js

@@ -33,6 +33,7 @@ export default class HorizontalRuleCommand extends Command {
 			const insertPosition = findOptimalInsertionPosition( selection, model );
 
 			model.insertContent( modelElement, insertPosition );
+			writer.setSelection( modelElement, 'on' );
 		} );
 	}
 }