What you want to do is not easy. I cannot guarantee that what follows will work.
You need to use command "autoSpellChecker" with the "popupMenu" option. See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/autoSpellChecker.html In your contextualSelection command, replace the line: <command name="commonContextualMenu" /> by: <choice> <command name="autoSpellChecker" parameter="popupMenu" /> <command name="commonContextualMenu" /> </choice> or, more sophisticated: <choice> <sequence> <pass> <test expression="not($selected) and not($mark)" /> <command name="autoSpellChecker" parameter="popupMenu" /> </pass> <command name="autoSpellChecker" parameter="popupMenu" /> <sequence> <command name="commonContextualMenu" /> </choice> which is intended to mean: use the popup menu of the spell checker if there is no explicit selection AND the caret is inside a misspelled word otherwise use the common contextual menu. Jacek.Lewandowski at ifb-group.com wrote: > > I've got one more question. I just realised that because of doing my own > context menus, I lost possibility to ses popup menus with notices from > spell checking tool, when the text is incorrect. Can I do somehow to have > both : my popup menus and popup menus with correct spellling notices? I am > not usign editMenu at all, only my predefined context menus, depending on > element selection. The sample code: > > <command name="contextualSelection"> > <macro> > <choice> > <sequence> > <test expression="$mark"/> > <command name="textContextualMenu" /> > </sequence> > <sequence> > <test expression="name($selected) = 'chapter' or > name($selected) = 'section' or > name($selected) = 'appendix'"/> > <command name="chSeApcontextualMenu" /> > </sequence> > <command name="commonContextualMenu" /> > </choice> > </macro> > </command> > > <!-- Contextual Menus ===================================================== > --> > > <command name="commonContextualMenu" > > <menu> > <item label="Undo" icon="xxe-gui:app/icons/undoAction.gif" > command="undo"/> > <item label="Redo" icon="xxe-gui:app/icons/redoAction.gif" > command="redo"/> > <separator /> > <item label="Cut" icon="xxe-gui:app/icons/cutAction.gif" > command="cut"/> > <item label="Copy" icon="xxe-gui:app/icons/copyAction.gif" > command="copy"/> > <item label="Paste before" > icon="xxe-gui:app/icons/pasteBeforeAction.gif" command="paste" > parameter="before[implicitElement]" /> > <item label="Paste" icon="xxe-gui:app/icons/pasteAction.gif" > command="paste" parameter="toOrInto" /> > <item label="Paste after" > icon="xxe-gui:app/icons/pasteAfterAction.gif" command="paste" > parameter="after[implicitElement]" /> > <separator /> > <item label="Revision Off" icon="icons/off.gif" > command="ifb.convertToNormal" /> > </menu> > </command> > > <!-- Added Bindings > =====================================================--> > <binding> > <mousePressed button="3"/> > <command name="contextualSelection" /> > </binding> >

