Figure Macro API

Last modified by Vincent Massol on 2024/04/25 11:11

cogAPI for manipulating Figure blocks
Developed by

Manuel Leduc, Vincent Massol, XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


Provide some useful APIs for handling Figures.

Figure Type Recognizer

Allows recognizing if a FigureBlock contains a table.

public interface FigureTypeRecognizer
     * @param figureBlock the figure block for which to recognize if it contains a table
     * @return true if the figure block content contains only a single table or false otherwise

   boolean isTable(FigureBlock figureBlock);

Example usage:

private FigureTypeRecognizer recognizer;
FigureBlock block = ...
boolean isTable = this.recognizer.isTable(block);

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Dependencies for this extension (org.xwiki.contrib:figure-macro-api 15.4.4):

Get Connected