Popup Menues

[Top]  [Chapter]  [Previous]  [Next]

Popup menus can be specified inside the <main> tags as well.

 

Example:

<main>

   ...

<!-- menues for the editor -->

<menues>

  <!-- this context menu will be used for text -->

  <popup name="standard">

    <menu wpa="Cut"/>

    <menu menu wpa="Copy"/>

    <menu menu wpa="Paste"/>

    <menu menu wpa="DeleteText"/>

    <menu caption="-"/>        

    <menu wpa="DiaParagraphProp"/>

  </popup>  

  <!-- this context menu will be used for images -->

  <popup name="graphics">

    <menu wpa="GraphicAsChar"/>

    <menu wpa="GraphicRelToPar"/>

    <menu wpa="GraphicRelToPage"/>

    <menu wpa="GraphicBothWrap"/>

    <menu wpa="GraphicNoWrap"/>

  </popup>

</menues>

</main>

 

The created standard popup menu:

clip0124

 

In menus you can use the parameter ifselected:

 

ifselected="yes" will automatically hide a menu if there is no selection,

ifselected="no" will hide the menu if currently text is selected.

 

Tips:

 

1) You can use

    <menu wpa="Bold" ifselected="yes"/>

    <menu wpa="Italic" ifselected="yes"/>

    <menu wpa="Underline" ifselected="yes"/>

 

in the standard menu to allow a possibility to toggle character styles.

 

2) If you want to allow pasting of simplified text (text attributes are removed) you can use the WPA actions PasteSimple and PasteText.

 

3) In case you need to temporarily disable a menu item please rename "menu" to "_menu" thus you do not need to create a HTML comment.

 

4) to create a sub menu You can nest the menu tags:

 

<menu caption="Character Attributes">

 <menu wpa="Bold"/>
 <menu wpa="Italic"/>
 <menu wpa="Underline"/>
 <menu wpa="StrikeOut"/>
 <menu caption="-"/>
 <menu wpa="SuperScript"/>
 <menu wpa="SubScript"/>
 <menu wpa="uppercase"/>
 <menu wpa="SmallCaps"/>

</menu>

 

Please note the nesting of the tags: <menu>...</menu>.

The tag <menu wpa="Bold"/> has the "/" at the end to mark it as "closed" tag.

 

 


[popupmenues.htm]    Copyright © 2007 by WPCubed GmbH