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

Commit

Permalink
Added: Alignment dropdown should have CSS class added.
Browse files Browse the repository at this point in the history
  • Loading branch information
jodator committed Feb 1, 2018
1 parent cd86a42 commit e89ef30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/alignmentui.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ export default class AlignmentUI extends Plugin {
tooltip: true
} );

dropdownView.extendTemplate( {
attributes: {
class: 'ck-alignment-dropdown'
}
} );

// The default icon is align left as we do not support RTL yet (see #3).
const defaultIcon = alignLeftIcon;

Expand Down
6 changes: 6 additions & 0 deletions tests/alignmentui.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ describe( 'Alignment UI', () => {
expect( button ).to.have.property( 'tooltip', true );
} );

it( 'should add custom CSS class to dropdown', () => {
dropdown.render();

expect( dropdown.element.classList.contains( 'ck-alignment-dropdown' ) ).to.be.true;
} );

it( '#toolbarView has the base properties', () => {
const toolbarView = dropdown.toolbarView;

Expand Down

0 comments on commit e89ef30

Please sign in to comment.