File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
src/extensions/markdown/Lists Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ const Playground = React.memo<PlaygroundProps>((props) => {
7070 . use ( MarkdownBlocksPreset , {
7171 image : false ,
7272 heading : false ,
73+ lists : {
74+ ulKey : keys . ulist ,
75+ olKey : keys . olist ,
76+ } ,
7377 breaks : { preferredBreak : breaks ? 'soft' : 'hard' } ,
7478 } )
7579 . use ( MarkdownMarksPreset , {
Original file line number Diff line number Diff line change 11export const keys = {
2- undo : 'cmd-z' ,
3- redo : 'shift-cmd-z' ,
4- bold : 'cmd-b' ,
5- italic : 'cmd-i' ,
6- underline : 'cmd-u' ,
7- strike : 'shift-cmd-s' ,
8- code : 'cmd-e' ,
2+ undo : 'mod-z' ,
3+ redo : 'shift-mod-z' ,
4+ bold : 'mod-b' ,
5+ italic : 'mod-i' ,
6+ underline : 'mod-u' ,
7+ strike : 'shift-mod-s' ,
8+ code : 'mod-e' ,
9+ ulist : 'mod-shift-l' ,
10+ olist : 'mod-shift-m' ,
911} ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export function toList(listType: NodeType): Command {
99 return ( state , dispatch ) => {
1010 const parentList = findAnyParentList ( state . schema ) ( state . selection ) ;
1111 if ( parentList ) {
12- if ( listType === parentList . node . type ) return false ;
12+ if ( listType === parentList . node . type ) return true ;
1313
1414 dispatch ?.( state . tr . setNodeMarkup ( parentList . pos , listType ) ) ;
1515 return true ;
You can’t perform that action at this time.
0 commit comments