QuickstartC002CustomMarkdownTypeHandler
version : 001
Maven dependancies :
- org.fugerit.java/fj-core
- org.fugerit.java/fj-doc-base
- org.fugerit.java/fj-doc-freemarker (for both html and pdf fop handlers)
- org.fugerit.java/fj-doc-mod-fop (for pdf fop handler)
QuickstartC002CustomMarkdowTypeHandler shows how is possible to create two custom doc type handlers from scratch :
- CustomMarkdownBasicTypeHandler is a doc type handler for markdown basic syntax.
- CustomMarkdownExtTypeHandler is a doc type handler for markdown extended syntax.
A DocTypeHandler must inspect all elements in DocBase model.
During inspection the doc meta model must be used to render actual output formats.
DocBase model is a java representation of the xml doc source.
In this case the inspection is implemented using DocTypeFacadeDefault facility.
- MarkdownBasicDocFacade is a doc type handler for markdown basic syntax.
- MarkdownExtDocFacade is a doc type handler for markdown extended syntax.
Note that MarkdownExtDocFacade simply extends and change some behaviours of MarkdownBasicDocFacade.
Here is CustomMarkdownExtTypeHandler output on a Markdown playgound :