Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #221 from ckeditor/t/ckeditor5-widget/99
Browse files Browse the repository at this point in the history
Internal: Aligned to the rename in the ckeditor5-widget package ("handler" became "handle", see ckeditor/ckeditor5-widget#99).
  • Loading branch information
Reinmar authored Oct 9, 2019
2 parents ac7be7b + 21fa3db commit 970ea91
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { findAncestor } from './commands/utils';
export function toTableWidget( viewElement, writer ) {
writer.setCustomProperty( 'table', true, viewElement );

return toWidget( viewElement, writer, { hasSelectionHandler: true } );
return toWidget( viewElement, writer, { hasSelectionHandle: true } );
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/_utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export function viewTable( tableData, attributes = {} ) {
} ) }</tbody>` : '';

const figureAttributes = asWidget ?
'class="ck-widget ck-widget_with-selection-handler table" contenteditable="false"' : 'class="table"';
const widgetHandler = '<div class="ck ck-widget__selection-handler"></div>';
'class="ck-widget ck-widget_with-selection-handle table" contenteditable="false"' : 'class="table"';
const widgetHandler = '<div class="ck ck-widget__selection-handle"></div>';

return `<figure ${ figureAttributes }>${ asWidget ? widgetHandler : '' }<table>${ thead }${ tbody }</table></figure>`;
}
Expand Down
20 changes: 10 additions & 10 deletions tests/converters/downcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ describe( 'downcast converters', () => {
setModelData( model, modelTable( [ [ '' ] ] ) );

expect( formatTable( getViewData( viewDocument, { withoutSelection: true } ) ) ).to.equal( formatTable(
'<figure class="ck-widget ck-widget_with-selection-handler table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handler"></div>' +
'<figure class="ck-widget ck-widget_with-selection-handle table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handle"></div>' +
'<table>' +
'<tbody>' +
'<tr>' +
Expand Down Expand Up @@ -566,8 +566,8 @@ describe( 'downcast converters', () => {

expect( formatTable(
getViewData( viewDocument, { withoutSelection: true } ) ) ).to.equal( formatTable(
'<figure class="ck-widget ck-widget_with-selection-handler table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handler"></div>' +
'<figure class="ck-widget ck-widget_with-selection-handle table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handle"></div>' +
'<table>' +
'<tbody>' +
'<tr>' +
Expand Down Expand Up @@ -712,8 +712,8 @@ describe( 'downcast converters', () => {
} );

expect( formatTable( getViewData( viewDocument, { withoutSelection: true } ) ) ).to.equal( formatTable(
'<figure class="ck-widget ck-widget_with-selection-handler table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handler"></div>' +
'<figure class="ck-widget ck-widget_with-selection-handle table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handle"></div>' +
'<table>' +
'<tbody>' +
'<tr>' +
Expand Down Expand Up @@ -889,8 +889,8 @@ describe( 'downcast converters', () => {
} );

expect( formatTable( getViewData( viewDocument, { withoutSelection: true } ) ) ).to.equal( formatTable(
'<figure class="ck-widget ck-widget_with-selection-handler table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handler"></div>' +
'<figure class="ck-widget ck-widget_with-selection-handle table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handle"></div>' +
'<table>' +
'<thead>' +
'<tr>' +
Expand Down Expand Up @@ -1103,8 +1103,8 @@ describe( 'downcast converters', () => {
} );

expect( formatTable( getViewData( viewDocument, { withoutSelection: true } ) ) ).to.equal( formatTable(
'<figure class="ck-widget ck-widget_with-selection-handler table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handler"></div>' +
'<figure class="ck-widget ck-widget_with-selection-handle table" contenteditable="false">' +
'<div class="ck ck-widget__selection-handle"></div>' +
'<table>' +
'<tbody>' +
'<tr>' +
Expand Down

0 comments on commit 970ea91

Please sign in to comment.