kindeditor 代码高亮设置
个人博客http://www.notewo.com/archive/3 ,没有代码高亮还是不行。
<link href="{{ static_url('css/index.css')}}" media="screen" rel="stylesheet" type="text/css"/> <link href="{{ static_url('kindeditor/plugins/code/prettify.css')}}" media="screen" rel="stylesheet" type="text/css"/> <script charset="utf-8" src="{{ static_url('kindeditor/kindeditor-min.js') }}"></script> <script charset="utf-8" src="{{ static_url('kindeditor/plugins/code/prettify.js') }}"></script>
<body onload='prettyPrint()'> var options = { cssPath: ['/static/kindeditor/plugins/code/prettify.css',],
再设置一下css :
pre.prettyprint { border: 0; border-left: 3px solid rgb(204, 204, 204); margin-left: 2em; padding: 0.5em; display: block; margin: 1em 0px; white-space: pre; word-break:break-all; word-wrap: break-word; word-break: normal; }
http://www.notewo.com/archive/3
www.notewo.com