Figure Macro API
Last modified by Vincent Massol on 2024/07/05 14:33
API for manipulating Figure blocks |
Type | JAR |
Category | API |
Developed by | |
Active Installs | 1 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Provide some useful APIs for handling Figures.
Figure Type Recognizer
Allows recognizing if a FigureBlock contains a table.
@Role
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);
}
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:
@Inject
private FigureTypeRecognizer recognizer;
...
FigureBlock block = ...
boolean isTable = this.recognizer.isTable(block);
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
Dependencies for this extension (org.xwiki.contrib:figure-macro-api 15.4.4):
- org.xwiki.commons:xwiki-commons-component-api 14.10
- org.xwiki.rendering:xwiki-rendering-api 14.10
- org.xwiki.rendering:xwiki-rendering-transformation-macro 14.10
- org.xwiki.platform:xwiki-platform-localization-api 14.10
- org.xwiki.platform:xwiki-platform-oldcore 14.10
- org.xwiki.platform:xwiki-platform-configuration-default 14.10