X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2Fpackagist%2Fludivine-ckeditor-component.git;a=blobdiff_plain;f=sources%2Fplugins%2Flistblock%2Fplugin.js;h=100159a6180dbcf0c0d5edb549348d406f20aba8;hp=21e6b08ce3cae43bf934f56fcaa00eb1094e221c;hb=1794320dcfdfcd19572fb1676294f9853a6bbc20;hpb=7183f6a6a21ad9124e70c997e0168459f377a9f2 diff --git a/sources/plugins/listblock/plugin.js b/sources/plugins/listblock/plugin.js index 21e6b08..100159a 100644 --- a/sources/plugins/listblock/plugin.js +++ b/sources/plugins/listblock/plugin.js @@ -12,7 +12,7 @@ CKEDITOR.plugins.add( 'listblock', { '' + '{text}' + '' + @@ -50,7 +50,7 @@ CKEDITOR.plugins.add( 'listblock', { keys[ 38 ] = 'prev'; // ARROW-UP keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB keys[ 32 ] = CKEDITOR.env.ie ? 'mouseup' : 'click'; // SPACE - CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (#8041). + CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (http://dev.ckeditor.com/ticket/8041). this._.pendingHtml = []; this._.pendingList = []; @@ -180,6 +180,14 @@ CKEDITOR.plugins.add( 'listblock', { this.onMark && this.onMark( item ); }, + markFirstDisplayed: function() { + var context = this; + this._.markFirstDisplayed( function() { + if ( !context.multiSelect ) + context.unmarkAll(); + } ); + }, + unmark: function( value ) { var doc = this.element.getDocument(), itemId = this._.items[ value ],