Hi!
Thanks for this. It helps!

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>

Kind regards,

Jacek Lewandowski
software development
ifb group AG, Cologne, Germany



                                                                           
             Hussein Shafie                                                
             <hussein at xmlmind.                                             
             com>                                                       To 
                                       Jacek.Lewandowski at ifb-group.com     
             19.10.2008 16:38                                           cc 
                                       "xmleditor-support at xmlmind.com"     
                                       <xmleditor-support at xmlmind.com>     
             Please respond to                                     Subject 
             "xmleditor-suppor         Re: [XXE] Xml mind configuration    
              t at xmlmind.com"           (???)                               
             <xmleditor-suppor                                             
              t at xmlmind.com>                                               
                                                                           
                                                                           
                                                                           
                                                                           




Jacek.Lewandowski at ifb-group.com wrote:
> It seems not to solve the problem becouse still when I double click on
> image it opens the dialog box with ???. Is it possible, insted of
standard
> dialog box like this(after double click of mouse):
>
> (Embedded image moved to file: pic24954.jpg)
>
>
> to have this:
>
> (Embedded image moved to file: pic32524.jpg)
>
> I try to do something like this: but it seems to work only for elements
> which are not 'imagedata' or 'graphic' but should for all element.
>
> <binding>
>       <mouseClicked2 button="1"/>
>       <command name="putAttribute" parameter="[implicitElement] fileref"
/>
>   </binding>
>
>   but it seems to work only for elements which are NOT 'imagedata' or
> 'graphic' but should works for all element.  Of course I can add test
> expresion="" but ths code above should work for all elements, but it
> doesn#t for imagedata and graphic.
>

Your analysis of the situation is 100% correct. What you did should work
fine, *except* that images are rendered using a specialized control
which intercepts the double-click (this is hard-wired in the code)
before your binding enters into the game.

The specialized control is: com.xmlmind.xmleditext.docbook.Graphic. See
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditext/docbook/Graphic.html


It is declared in XXE_install_dir/addon/config/docbook/css/image.imp:
---
graphic,
inlinegraphic,
imagedata {
    content: gadget("com.xmlmind.xmleditext.docbook.Graphic");
}
---

Therefore unless you replace com.xmlmind.xmleditext.docbook.Graphic by a
custom gadget of yours[*], what you want to do cannot work.


---
[*] Subclassing com.xmlmind.xmleditext.docbook.Graphic should work fine,
but you need to be a Java[tm] programmer to do that.






Reply via email to