File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 214214
215215 effects . forEach ( function ( item ) {
216216 var tag = item . nodeName . toLowerCase ( ) ;
217- if ( tag === 'a' ) {
218- menu . querySelector ( 'input' ) . value = item . href ;
219- return highlight ( 'createlink' ) ;
217+ switch ( tag ) {
218+ case 'a' : return ( menu . querySelector ( 'input' ) . value = item . href ) , highlight ( 'createlink' ) ;
219+ case 'i' : return highlight ( 'italic' ) ;
220+ case 'u' : return highlight ( 'underline' ) ;
221+ case 'b' : return highlight ( 'bold' ) ;
222+ case 'ul' : return highlight ( 'insertunorderedlist' ) ;
223+ case 'ol' : return highlight ( 'insertorderedlist' ) ;
224+ case 'ol' : return highlight ( 'insertorderedlist' ) ;
225+ case 'li' : return highlight ( 'indent' ) ;
226+ default : highlight ( tag ) ;
220227 }
221- if ( tag === 'i' ) return highlight ( 'italic' ) ;
222- if ( tag === 'u' ) return highlight ( 'underline' ) ;
223- if ( tag === 'b' ) return highlight ( 'bold' ) ;
224- if ( tag === 'ul' ) return highlight ( 'insertunorderedlist' ) ;
225- if ( tag === 'ol' ) return highlight ( 'insertorderedlist' ) ;
226- if ( tag === 'ol' ) return highlight ( 'insertorderedlist' ) ;
227- if ( tag === 'li' ) return highlight ( 'indent' ) ;
228- return highlight ( tag ) ;
229228 } ) ;
230229
231230 return this ;
You can’t perform that action at this time.
0 commit comments