Beat in Timeleaf

What would be the best way to implement Markdown in Thymeleaf?

  • pattern mode
  • new dialect (which processors?)

It would be helpful if I could embed markings in the HTML.

+4
source share
1 answer

From what I understood from Javadoc, I will have to first implement a label retention tool as AbstractAttributeModelProcessorwell as use structureHandler.setLocalVariableto set this variable. Then I realized how markdown performer AbstractTextProcessorin the method doProcessto check a variable using context.getVariable, and if it is set to replace the text with a new: text.setText(transformMarkdown(..)).

Read more at https://github.com/thymeleaf/thymeleaf/issues/439 .

+1
source

Source: https://habr.com/ru/post/1618762/


All Articles