8
0
Просмотр исходного кода

Added toggling check state of selected todo list items on keystroke.

Oskar Wróbel 6 лет назад
Родитель
Сommit
64a634807f
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      packages/ckeditor5-list/src/todolistediting.js

+ 3 - 0
packages/ckeditor5-list/src/todolistediting.js

@@ -78,6 +78,9 @@ export default class TodoListEditing extends Plugin {
 		// <ul><li><checkbox/>Bar</li></ul>
 		editor.keystrokes.set( 'arrowleft', ( evt, stop ) => jumpOverCheckmarkOnLeftArrowKeyPress( stop, model ) );
 
+		// Toggle check state of selected todo list items on keystroke.
+		editor.keystrokes.set( 'Ctrl+space', () => editor.execute( 'todoListCheck' ) );
+
 		// Remove `todoListChecked` attribute when a host element is no longer a todo list item.
 		const listItemsToFix = new Set();