2017-03-23 85 views
0

我有整合prism代碼有問題的網站簡介的CKEditor的在線版本語法高亮顯示我已經添加了必需的JS和CSS文件中<head>標籤但卻亮點似乎並不奏效CKEditor的內嵌代碼片斷突出

注:高亮顯示工作正常枝條完整編輯的版本(「替換」,而不是「內聯」)

這裏是我的代碼:

<title>Title</title> 
<link rel="stylesheet" href="plugins/codesnippet/lib/highlight/styles/arta.css"> 
<script src="ckeditor.js"></script> 
<script src="plugins/codesnippet/lib/highlight/highlight.pack.js"></script> 

</head> 

<body> 
    <div id="editor" contenteditable="true"> 
     <h1>Hello world!</h1> 
     <p>I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.</p> 
    </div> 
</body> 
<script language="JavaScript"> 
    (function() { 
     CKEDITOR.inline('editor') 
    })(); 
</script> 

</html> 

,這就是我得到: Screenshot of my CKEditor

回答

0

我發現是什麼原因造成它似乎棱鏡熒光筆不處理的棱鏡JS和CSS文件自動加載的問題,解決的辦法就是這兩個行:

 <script src="plugins/prism/lib/prism/prism_patched.min.js"></script> 
     <link rel="stylesheet" href="plugins/prism/lib/prism/prism_patched.min.css">