2016-04-29 92 views

回答

1

CKEditor將頁面上的textarea元素轉換爲編輯器,因此您可以將該textarea元素的初始文本設置爲編號列表。

下面是來自CKEditor Quick Start Guide樣本頁面的初始文本改爲編號列表:

<!DOCTYPE html> 
<html> 
    <head> 
     <meta charset="utf-8"> 
     <title>A Simple Page with CKEditor</title> 
     <!-- Make sure the path to CKEditor is correct. --> 
     <script src="../ckeditor.js"></script> 
    </head> 
    <body> 
     <form> 
      <textarea name="editor1" id="editor1" rows="10" cols="80"> 
       <ol><li /></ol> 
      </textarea> 
      <script> 
       // Replace the <textarea id="editor1"> with a CKEditor 
       // instance, using default configuration. 
       CKEDITOR.replace('editor1'); 
      </script> 
     </form> 
    </body> 
</html> 
相關問題