This time we introduce is how the front part of the integrated markdown editor in their springboot project (idea + thymleaf template engine), the effect is shown below:
markdown official website of the plug-in download address is: markdown plug-Download
here also offers Baidu cloud of :
Link: https://pan.baidu.com/s/1KzC-j8IO-WSpnaIgMlKDqw
Extraction code: After zbji
decompression, we can see the directory structure as follows: First, we go to the example folder of this folder and open the simple page
This is our template, and then how to import it into your front-end project.
Then import the html file into your templates directory.
Then we can see references to it in css and js, css remove other directories such as:
control where we admitted these files down to the static:
as well as editor.md-master \ examples \ css under
and editor.md- Under master\examples\js : copy it to your own static directory. For clarity, place css under the css folder and js under the js folder. The directory structure is as follows:
according to this directory structure, then slightly modify the href reference The path can be!
Then configure your own controller , just visit!
If the page cannot be loaded and the style (F12) is not displayed, check whether the resource is 404. If the 404 is found, the path is wrong. Check it, or the file is not copied or the order of the source file is changed. These points need to be noted!
Hope to help everyone, thank you!
How to integrate markdown plug-in in HTML [thymleaf template engine used by springboot project (idea version)]
Guess you like
Origin blog.csdn.net/Pzzzz_wwy/article/details/106026197
Recommended
Ranking