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

Commit

Permalink
TEMP
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Jun 19, 2018
1 parent 5459d0a commit 24f9dfe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/headingui.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ export default class HeadingUI extends Plugin {
for ( const option of options ) {
const itemModel = new Model( {
label: option.title,
class: option.class
class: option.class,
withText: true
} );

if ( option.model === 'paragraph' ) {
itemModel.bind( 'isActive' ).to( paragraphCommand, 'value' );
itemModel.bind( 'isOn' ).to( paragraphCommand, 'value' );
itemModel.set( 'commandName', 'paragraph' );
commands.push( paragraphCommand );
} else {
itemModel.bind( 'isActive' ).to( headingCommand, 'value', value => value === option.model );
itemModel.bind( 'isOn' ).to( headingCommand, 'value', value => value === option.model );
itemModel.set( {
commandName: 'heading',
commandValue: option.model
Expand Down

0 comments on commit 24f9dfe

Please sign in to comment.