后台写文章,更换编辑器了
原先使用的Md编辑器功能有点少,比如不能插入以下图标:
♣ ♥ ♦
当然上面的仅仅是展示部分图标。
,这次加入了很多功能,本来想着优化以下代码的展示格式,比如代码高亮显示和代码背景自定义颜色什么的。因为存在bug就没有上线。有更好的编辑器,希望大家啊能推荐给我。
标题一
标题1
标题二
标题2
标题2.1
标题2.2
感谢 editor.md的作者
大大大的logo
然后关闭了html标签解析,所以,以前的文章html标签会显示出来。。。。算了,也不想修复了。
终于搞完了,改源码,改的我不要不要的。。。冲突的东西太多了,能力有限!!!
不搞了!!
测试代码
JS代码
function test() {
console.log("Hello world!");
}
(function(){
var box = function() {
return box.fn.init();
};
box.prototype = box.fn = {
init : function(){
console.log('box.init()');
return this;
},
add : function(str) {
alert("add", str);
return this;
},
remove : function(str) {
alert("remove", str);
return this;
}
};
box.fn.init.prototype = box.fn;
window.box =box;
})();
var testBox = box();
testBox.add("jQuery").remove("jQuery");
HTML 代码 HTML codes
<!DOCTYPE html>
<html>
<head>
<mate charest="utf-8" />
<meta name="keywords" content="Editor.md, Markdown, Editor" />
<title>Hello world!</title>
<style type="text/css">
body{font-size:14px;color:#444;font-family: "Microsoft Yahei", Tahoma, "Hiragino Sans GB", Arial;background:#fff;}
ul{list-style: none;}
img{border:none;vertical-align: middle;}
</style>
</head>
<body>
<h1 class="text-xxl">Hello world!</h1>
<p class="text-green">Plain text</p>
</body>
</html>
Java 代码
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Autowired
BraumIntercepter braumIntercepter;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(braumIntercepter)
.excludePathPatterns("/error/**", "favicon.ico", "/css/**", "/js/**", "/img/**", "/fonts/**")
.addPathPatterns("/**");
}
}
正文到此结束(点击广告是对作者最大的支持)