How to resize images and tables inside Xopus editor

In Xopus 5.4.1 the bug where resize handles were not shown for images or tables was fixed.

Here's how to configure Xopus to enable the handles:

 

Image

  1. To show resize handles in a document, width/height role should be added to images node in config.
    Example:
    <x:node match="image/@width">
          <x:name xml:lang="en">Width</x:name>
          <x:role>width</x:role>
    </x:node>
    <x:node match="image/@height">
          <x:name xml:lang="en">Height</x:name>
          <x:role>height</x:role>
    </x:node>
    
  2. To keep aspect ratio a user can press alt while dragging
  3. To force keeping aspect ratio, add keep-aspect-ratio role to image node
    Example:
    <x:node match="image">
          <x:role>image</x:role>
          <x:role>symbol</x:role>
          <x:role>keep-aspect-ratio</x:role>
          <x:name xml:lang="en">Image</x:name>
    </x:node>
    
  4. Resize handles are only shown if width/height value is explicitly set
  5. If only one of these values are set you can only resize in this direction (only this value will be updated)
  6. You can still resize diagonally. Only set value will be updated while the other will be calculated using aspect ratio (regardless of whether this role is set or not)
  7. Image size can be set using explicit number only (e.g. 120) which is in pixels
  8. Number followed by a unit of measure format (pc, pt, px, ect.) is not supported (e.g. 12cm)

Table

  1. To enable resizing of table columns add width role to colwidth attribute
    Example:
    <x:node match="@colwidth">
          <x:name xml:lang="en">Column Width</x:name>
          <x:role>width</x:role>
    </x:node>
    
  2. To enable resizing of table rows, add height role to row's height attribute.
    Example:
    <x:node match="row/@height">
          <x:name xml:lang="en">Height</x:name>
          <x:role>height</x:role>
    </x:node>
    
  3. To resize a table's width, add this role to corresponding table attribute. Browsers do not support resizing whole table by height and plan to stop supporting resizing by width. Check browser compatibility before using it: http://www.w3schools.com/tags/att_table_width.asp
    Example:
    <x:node match="table/@width">
          <x:name xml:lang="en">Width</x:name>
    </x:node>
    
  4. Resizing is only available if width is set in the document
  5. Width can be set as explicit number of pixels (e.g. 12) or as a relative value (e.g. 2* meaning it takes 2 shares of the table)
  6. Setting size with specified units (pt, cm, mm, pi, in) or their combination (2*+3pt) is not supported