Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Maciej <jodator@jodator.net>
  • Loading branch information
niegowski and jodator authored May 7, 2020
1 parent a4c69f4 commit 7aa2f44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ckeditor5-table/src/tablenavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default class TableNavigation extends Plugin {
const selectedCells = getSelectedTableCells( selection );

if ( selectedCells.length ) {
let focusCell = null;
let focusCell;

if ( expandSelection ) {
focusCell = this.editor.plugins.get( 'TableSelection' ).getFocusCell();
Expand Down
7 changes: 7 additions & 0 deletions packages/ckeditor5-table/src/tableselection.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ export default class TableSelection extends Plugin {
* Sets the model selection based on given anchor and target cells (can be the same cell).
* Takes care of setting the backward flag.
*
* const modelRoot = editor.model.document.getRoot();
* const firstCell = modelRoot.getNodeByPath( [ 0, 0, 0 ] );
* const lastCell = modelRoot.getNodeByPath( [ 0, 0, 1 ] );
*
* const tableSelection = editor.plugins.get( 'TableSelection' );
* tableSelection.setCellSelection( firstCell, lastCell );
*
* @param {module:engine/model/element~Element} anchorCell
* @param {module:engine/model/element~Element} targetCell
*/
Expand Down

0 comments on commit 7aa2f44

Please sign in to comment.