@using Microsoft.Extensions.Configuration
@model string
@inject IConfiguration _configuration
<link rel="stylesheet" href="@(_configuration["CDNBaseAddress"])/lib/editor.md/css/editormd.min.css" />
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/editormd.min.js"></script>
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/lib/marked.min.js"></script>
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/lib/prettify.min.js"></script>
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/lib/raphael.min.js"></script>
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/lib/underscore.min.js"></script>
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/lib/sequence-diagram.min.js"></script>
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/lib/flowchart.min.js"></script>
<script src="@(_configuration["CDNBaseAddress"])/lib/editor.md/lib/jquery.flowchart.min.js"></script>
<style>
img { max-width: 100% }
pre { overflow: hidden !important; }
</style>
<div>
<div id="editor" class="editormd-preview-theme-dark" style="width: 85%;margin: 0 auto">
<textarea style="display: none;">@Model</textarea>
</div>
</div>
<script type="text/javascript">
$(function () {
let view = editormd.markdownToHTML("editor", {
htmlDecode: "style,script,iframe", // you can filter tags decode
emoji: true,
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
});
</script>