@@ -15,7 +15,7 @@ import { Parser } from '../../plugin-parser/src/Parser';
1515import { Renderer } from '../../plugin-renderer/src/Renderer' ;
1616import { Keymap } from '../../plugin-keymap/src/Keymap' ;
1717import JWEditor , { Loadables } from '../../core/src/JWEditor' ;
18- import { distinct , isTextVisible } from '../../utils/src/utils' ;
18+ import { distinct , isInTextualContext } from '../../utils/src/utils' ;
1919import { Layout } from '../../plugin-layout/src/Layout' ;
2020import { ActionableNode } from '../../plugin-layout/src/ActionableNode' ;
2121import { Attributes } from '../../plugin-xml/src/Attributes' ;
@@ -108,7 +108,7 @@ export class List<T extends JWPluginConfig = JWPluginConfig> extends JWPlugin<T>
108108 label : 'Toggle ordered list' ,
109109 commandId : 'toggleList' ,
110110 commandArgs : { type : ListType . ORDERED } as ListParams ,
111- visible : isTextVisible ,
111+ visible : isInTextualContext ,
112112 selected : ( editor : JWEditor ) : boolean => {
113113 const range = editor . selection . range ;
114114 const startIsList = List . isInList ( ListType . ORDERED , range . start ) ;
@@ -131,7 +131,7 @@ export class List<T extends JWPluginConfig = JWPluginConfig> extends JWPlugin<T>
131131 label : 'Toggle unordered list' ,
132132 commandId : 'toggleList' ,
133133 commandArgs : { type : ListType . UNORDERED } as ListParams ,
134- visible : isTextVisible ,
134+ visible : isInTextualContext ,
135135 selected : ( editor : JWEditor ) : boolean => {
136136 const range = editor . selection . range ;
137137 const startIsList = List . isInList ( ListType . UNORDERED , range . start ) ;
@@ -154,7 +154,7 @@ export class List<T extends JWPluginConfig = JWPluginConfig> extends JWPlugin<T>
154154 label : 'Toggle checkbox list' ,
155155 commandId : 'toggleList' ,
156156 commandArgs : { type : ListType . CHECKLIST } as ListParams ,
157- visible : isTextVisible ,
157+ visible : isInTextualContext ,
158158 selected : ( editor : JWEditor ) : boolean => {
159159 const range = editor . selection . range ;
160160 const startIsList = List . isInList ( ListType . CHECKLIST , range . start ) ;
0 commit comments