Syntaxes
Last modified by Vincent Massol on 2021/04/19 20:04
Syntaxes are registered into the Syntax Registry.
You can list all registered syntaxes using:
@Inject
private SyntaxRegistry registry;
...
List<Syntax> syntaxes = registry.getSyntaxes();
private SyntaxRegistry registry;
...
List<Syntax> syntaxes = registry.getSyntaxes();
You can also get a Syntax object from a Syntax id string using (for example):
@Inject
private SyntaxRegistry registry;
...
Optional<Syntax> syntax = registry.getSyntax("xwiki/2.1");
private SyntaxRegistry registry;
...
Optional<Syntax> syntax = registry.getSyntax("xwiki/2.1");