Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
smileNicky
myblog
提交
cb4fa1bf
M
myblog
项目概览
smileNicky
/
myblog
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
myblog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
cb4fa1bf
编写于
1月 31, 2019
作者:
S
smileNicky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
文章详情页面
上级
5649eff5
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
3799 addition
and
49 deletion
+3799
-49
src/src/main/webapp/WEB-INF/jsp/myblog/article/article_details.jsp
...ain/webapp/WEB-INF/jsp/myblog/article/article_details.jsp
+130
-49
src/src/main/webapp/articleDetail.jsp
src/src/main/webapp/articleDetail.jsp
+115
-0
src/src/main/webapp/plugins/editormd/css/editormd.preview.css
...src/main/webapp/plugins/editormd/css/editormd.preview.css
+3554
-0
未找到文件。
src/src/main/webapp/WEB-INF/jsp/myblog/article/article_details.jsp
浏览文件 @
cb4fa1bf
<%@ page
language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
pageEncoding=
"UTF-8"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<%
String
path
=
request
.
getContextPath
();
String
basePath
=
request
.
getScheme
()+
"://"
+
request
.
getServerName
()+
":"
+
request
.
getServerPort
()+
path
+
"/"
;
String
loadBlogUrl
=
basePath
+
"toblog.do?pageNo="
;
String
path
=
request
.
getContextPath
();
String
basePath
=
request
.
getScheme
()+
"://"
+
request
.
getServerName
()+
":"
+
request
.
getServerPort
()+
path
+
"/"
;
%>
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"
>
<html>
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<base
href=
"
<%=
basePath
%>
"
>
<title>
Nicky's blog
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
name=
"Keywords"
content=
""
>
<meta
name=
"Description"
content=
""
>
<meta
name=
"keywords"
content=
""
/>
<meta
name=
"description"
content=
""
/>
<link
href=
"static/blog/css/blog.css"
rel=
"stylesheet"
>
<link
href=
'http://fonts.googleapis.com/css?family=Arizonia'
rel=
'stylesheet'
type=
'text/css'
>
<script
type=
"text/javascript"
src=
"static/js/jquery-1.8.3.js"
></script>
</head>
<base
href=
"
<%=
basePath
%>
"
>
<title>
Nicky's blog
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
name=
"Keywords"
content=
""
>
<meta
name=
"Description"
content=
""
>
<meta
name=
"keywords"
content=
""
/>
<meta
name=
"description"
content=
""
/>
<link
href=
"static/blog/css/blog.css"
rel=
"stylesheet"
/>
<link
rel=
"stylesheet"
href=
"plugins/editormd/css/editormd.preview.css"
/>
<link
href=
'http://fonts.googleapis.com/css?family=Arizonia'
rel=
'stylesheet'
type=
'text/css'
/>
<style>
.editormd-html-preview
{
width
:
90%
;
margin
:
0
auto
;
}
</style>
</head>
<body>
<%@ include
file=
"../frame/top.jsp"
%>
<%@ include
file=
"../frame/top.jsp"
%>
<div
class=
"blank"
></div>
<div
class=
"article"
>
<div
class=
"content"
>
<div
class=
"bloglist"
>
<!--article begin-->
<c:choose>
<c:when
test=
"
${
not
empty
articles
}
"
>
<c:forEach
items=
"
${
articles
}
"
var=
"ar"
varStatus=
"art"
>
<ul>
<h2>
<a
title=
"${ar.articleName }"
href=
"/"
target=
"_blank"
>
${ar.articleName }
</a></h2>
<p>
${ar.articleContent }
</p>
<p
>
<span>
${ar.articleTime }
</span>
<span>
作者:
</span>
<span>
分类:
<a
href=
"/"
target=
"_blank"
>
心得笔记
</a></span>
<span>
阅读(${ar.articleClick })
</span>
<span>
评论(124)
</span>
</p>
</ul>
</c:forEach>
</c:when>
<c:otherwise>
<li>
没有相关数据
</li>
</c:otherwise>
</c:choose>
<!--article end-->
</div>
</div>
<%@ include
file=
"../frame/navsidebar.jsp"
%>
<div
class=
"content"
id=
"layer"
>
<div
id=
"test-editormd-view"
>
<textarea
id=
"append-test"
style=
"display:none;"
name=
"test-editormd-markdown-doc"
>
###科学公式 TeX(KaTeX)
$$E=mc^2$$
行内的公式$$E=mc^2$$行内的公式,行内的$$E=mc^2$$公式。
$$\(\sqrt{3x-1}+(1+x)^2\)$$
$$\sin(\alpha)^{\theta}=\sum_{i=0}^{n}(x^i + \cos(f))$$
$$X^2 > Y$$
#####上标和下标
上标:X
<
sup
>
2
<
/sup
>
下标:O
<
sub
>
2
<
/sub
>
##### 代码块里包含的过滤标签及属性不会被过滤
```html
<
style type="text/style"
>
body{background:red;}
<
/style
>
<
script type="text/javscript"
>
alert("script");
<
/script
>
<
iframe height=498 width=510 src="http://player.youku.com/embed/XMzA0MzIwMDgw" frameborder=0 allowfullscreen
><
/iframe
>
```
#####Style
<
style
>
body{background:red;}
<
/style
>
<
style type="text/style"
>
body{background:red;}
<
/style
>
#####Script
<
script
>
alert("script");
<
/script
>
<
script type="text/javscript"
>
alert("script");
<
/script
>
</textarea>
</div>
</div>
</div>
<script
src=
"static/js/jquery-1.8.3.js"
></script>
<script
src=
"plugins/editormd/lib/marked.min.js"
></script>
<script
src=
"plugins/editormd/lib/prettify.min.js"
></script>
<script
src=
"plugins/editormd/lib/raphael.min.js"
></script>
<script
src=
"plugins/editormd/lib/underscore.min.js"
></script>
<script
src=
"plugins/editormd/lib/sequence-diagram.min.js"
></script>
<script
src=
"plugins/editormd/lib/flowchart.min.js"
></script>
<script
src=
"plugins/editormd/lib/jquery.flowchart.min.js"
></script>
<script
src=
"plugins/editormd/editormd.js"
></script>
<script
type=
"text/javascript"
>
$
(
function
()
{
var
testEditormdView
;
/*$.get("test.md", function(markdown) {
testEditormdView = editormd.markdownToHTML("test-editormd-view", {
markdown : markdown ,//+ "\r\n" + $("#append-test").text(),
//htmlDecode : true, // 开启 HTML 标签解析,为了安全性,默认不开启
htmlDecode : "style,script,iframe", // you can filter tags decode
//toc : false,
tocm : true, // Using [TOCM]
//tocContainer : "#custom-toc-container", // 自定义 ToC 容器层
//gfm : false,
//tocDropdown : true,
// markdownSourceCode : true, // 是否保留 Markdown 源码,即是否删除保存源码的 Textarea 标签
emoji : true,
taskList : true,
tex : true, // 默认不解析
flowChart : true, // 默认不解析
sequenceDiagram : true, // 默认不解析
});
//console.log("返回一个 jQuery 实例 =>", testEditormdView);
// 获取Markdown源码
//console.log(testEditormdView.getMarkdown());
//alert(testEditormdView.getMarkdown());
});*/
testEditormdView
=
editormd
.
markdownToHTML
(
"
test-editormd-view
"
,
{
htmlDecode
:
"
style,script,iframe
"
,
// you can filter tags decode
emoji
:
true
,
taskList
:
true
,
tex
:
true
,
// 默认不解析
flowChart
:
true
,
// 默认不解析
sequenceDiagram
:
true
,
// 默认不解析
});
});
</script>
<%@ include
file=
"../frame/footer.jsp"
%>
</body>
</html>
\ No newline at end of file
src/src/main/webapp/articleDetail.jsp
0 → 100644
浏览文件 @
cb4fa1bf
<%@ page
language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fmt"
uri=
"http://java.sun.com/jsp/jstl/fmt"
%>
<%
String
path
=
request
.
getContextPath
();
String
basePath
=
request
.
getScheme
()+
"://"
+
request
.
getServerName
()+
":"
+
request
.
getServerPort
()+
path
+
"/"
;
%>
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<base
href=
"
<%=
basePath
%>
"
>
<meta
charset=
"utf-8"
/>
<title>
HTML Preview(markdown to html) - Editor.md examples
</title>
<link
rel=
"stylesheet"
href=
"
<%=
basePath
%>
/plugins/editormd/css/editormd.preview.css"
/>
<style>
.editormd-html-preview
{
width
:
90%
;
margin
:
0
auto
;
}
</style>
</head>
<body>
<div
id=
"layout"
>
<header>
<h1>
Markdown转HTML的显示处理
</h1>
<p>
即:非编辑情况下的HTML预览
</p>
<p>
HTML Preview(markdown to html)
</p>
</header>
<div
id=
"test-editormd-view"
>
<textarea
id=
"append-test"
style=
"display:none;"
>
###科学公式 TeX(KaTeX)
$$E=mc^2$$
行内的公式$$E=mc^2$$行内的公式,行内的$$E=mc^2$$公式。
$$\(\sqrt{3x-1}+(1+x)^2\)$$
$$\sin(\alpha)^{\theta}=\sum_{i=0}^{n}(x^i + \cos(f))$$
$$X^2 > Y$$
#####上标和下标
上标:X
<
sup
>
2
<
/sup
>
下标:O
<
sub
>
2
<
/sub
>
##### 代码块里包含的过滤标签及属性不会被过滤
```html
<
style type="text/style"
>
body{background:red;}
<
/style
>
<
script type="text/javscript"
>
alert("script");
<
/script
>
<
iframe height=498 width=510 src="http://player.youku.com/embed/XMzA0MzIwMDgw" frameborder=0 allowfullscreen
><
/iframe
>
```
#####Style
<
style
>
body{background:red;}
<
/style
>
<
style type="text/style"
>
body{background:red;}
<
/style
>
#####Script
<
script
>
alert("script");
<
/script
>
<
script type="text/javscript"
>
alert("script");
<
/script
>
</textarea>
</div>
</div>
<!-- <script src="js/zepto.min.js"></script>
<script>
var jQuery = Zepto; // 为了避免修改flowChart.js和sequence-diagram.js的源码,所以使用Zepto.js时想支持flowChart/sequenceDiagram就得加上这一句
</script> -->
<script
src=
"
<%=
basePath
%>
/static/js/jquery.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/lib/marked.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/lib/prettify.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/lib/raphael.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/lib/underscore.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/lib/sequence-diagram.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/lib/flowchart.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/lib/jquery.flowchart.min.js"
></script>
<script
src=
"
<%=
basePath
%>
/plugins/editormd/editormd.js"
></script>
<script
type=
"text/javascript"
>
$
(
function
()
{
var
testEditormdView
;
testEditormdView
=
editormd
.
markdownToHTML
(
"
test-editormd-view
"
,
{
htmlDecode
:
"
style,script,iframe
"
,
// you can filter tags decode
emoji
:
true
,
taskList
:
true
,
tex
:
true
,
// 默认不解析
flowChart
:
true
,
// 默认不解析
sequenceDiagram
:
true
,
// 默认不解析
});
});
</script>
</body>
</html>
\ No newline at end of file
src/src/main/webapp/plugins/editormd/css/editormd.preview.css
0 → 100644
浏览文件 @
cb4fa1bf
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录