What will be the best way to implement Markdown in Thymeleaf?
It would be useful if I can embed markdown in HTML.
From what I understood from Javadoc, I will have to implement first the markdown enabler as an AbstractAttributeModelProcessor
and use structureHandler.setLocalVariable
to set that variable. Then I have to implement the markdown executor as an AbstractTextProcessor
and in the doProcess
method to test the variable using context.getVariable
and if set to replace the text with a new one: text.setText(transformMarkdown(..))
.
See more at https://github.com/thymeleaf/thymeleaf/issues/439.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With