@@ -36,7 +36,8 @@ export default class BoldUI extends Plugin {
label: t( 'Bold' ),
icon: boldIcon,
keystroke: 'CTRL+B',
- tooltip: true
+ tooltip: true,
+ isToggleable: true
} );
view.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
@@ -37,7 +37,8 @@ export default class CodeUI extends Plugin {
view.set( {
label: t( 'Code' ),
icon: codeIcon,
@@ -36,7 +36,8 @@ export default class ItalicUI extends Plugin {
label: t( 'Italic' ),
icon: italicIcon,
keystroke: 'CTRL+I',
@@ -36,7 +36,8 @@ export default class StrikethroughUI extends Plugin {
label: t( 'Strikethrough' ),
icon: strikethroughIcon,
keystroke: 'CTRL+SHIFT+X',
@@ -35,7 +35,8 @@ export default class SubscriptUI extends Plugin {
label: t( 'Subscript' ),
icon: subscriptIcon,
@@ -35,7 +35,8 @@ export default class SuperscriptUI extends Plugin {
label: t( 'Superscript' ),
icon: superscriptIcon,
@@ -36,7 +36,8 @@ export default class UnderlineUI extends Plugin {
label: t( 'Underline' ),
icon: underlineIcon,
keystroke: 'CTRL+U',
@@ -43,6 +43,7 @@ describe( 'BoldUI', () => {
expect( boldView.label ).to.equal( 'Bold' );
expect( boldView.icon ).to.match( /<svg / );
expect( boldView.keystroke ).to.equal( 'CTRL+B' );
+ expect( boldView.isToggleable ).to.be.true;
it( 'should execute bold command on model execute event', () => {
@@ -42,6 +42,7 @@ describe( 'CodeUI', () => {
expect( codeView.isOn ).to.be.false;
expect( codeView.label ).to.equal( 'Code' );
expect( codeView.icon ).to.match( /<svg / );
+ expect( codeView.isToggleable ).to.be.true;
it( 'should execute code command on model execute event', () => {
@@ -44,6 +44,7 @@ describe( 'ItalicUI', () => {
expect( italicView.label ).to.equal( 'Italic' );
expect( italicView.icon ).to.match( /<svg / );
expect( italicView.keystroke ).to.equal( 'CTRL+I' );
+ expect( italicView.isToggleable ).to.be.true;
it( 'should execute italic command on model execute event', () => {
@@ -44,6 +44,7 @@ describe( 'StrikethroughUI', () => {
expect( strikeView.label ).to.equal( 'Strikethrough' );
expect( strikeView.icon ).to.match( /<svg / );
expect( strikeView.keystroke ).to.equal( 'CTRL+SHIFT+X' );
+ expect( strikeView.isToggleable ).to.be.true;
it( 'should execute strikethrough command on model execute event', () => {
@@ -42,6 +42,7 @@ describe( 'SubscriptUI', () => {
expect( subView.isOn ).to.be.false;
expect( subView.label ).to.equal( 'Subscript' );
expect( subView.icon ).to.match( /<svg / );
+ expect( subView.isToggleable ).to.be.true;
it( 'should execute subscript command on model execute event', () => {
@@ -42,6 +42,7 @@ describe( 'SuperscriptUI', () => {
expect( superView.isOn ).to.be.false;
expect( superView.label ).to.equal( 'Superscript' );
expect( superView.icon ).to.match( /<svg / );
+ expect( superView.isToggleable ).to.be.true;
it( 'should execute superscript command on model execute event', () => {
@@ -44,6 +44,7 @@ describe( 'Underline', () => {
expect( underlineView.label ).to.equal( 'Underline' );
expect( underlineView.icon ).to.match( /<svg / );
expect( underlineView.keystroke ).to.equal( 'CTRL+U' );
+ expect( underlineView.isToggleable ).to.be.true;
it( 'should execute underline command on model execute event', () => {