woff 發表於 2013-11-25 17:24:23

線上HTML編輯器 CKeditor 4.3

所見即所得編輯器
(1)
下載完成後,請解壓縮於所建立的網站目錄內,以方便套用將程式放至<head></head>標籤之間<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>
(2)建一textarea欄且類別命名為ckeditor,而該欄名可隨意,但自已需知道
test.php例子說明:(可直接把程式覆製起來練習)<html>
<head>
    <title>CKeditor使用例子教學 by woff</title>
    <meta content="text/html; charset=utf-8" http-equiv="content-type"/>   <!-- 預設路徑src="./ckeditor/ckeditor.js"若要放於不同路徑請改這裡-->
    <script type="text/javascript" src="./ckeditor/ckeditor.js"></script>
   
</head>
<body>
<form name="form" action="test.php" method="POST"><!--若要控制CKeditor大小可用如下方式,用表格設定其大小--><table width="580" cellspacing="0" cellpadding="0">   <tr><td width="500">   <textarea class="ckeditor" cols="40" id="editor1" name="editor1" rows="10">       </textarea>   </td></tr>
   </table>   <!--第二個CKeditor套用,注意類別一樣命名為ckeditor,但欄名需命名為不同-->         <textareaclass="ckeditor" cols="80" id="editor2" name="editor2" rows="10">      </textarea><br><input type="submit" value="送出"/>
      
</form>
</body>
</html><!--收取送出的資料,並顯示出來 -->
<?phpecho $_POST['editor1'];   //放你隨意命名的欄名?>

呵呵 發表於 2013-11-25 21:19:44

{:5_4:}牛X海海!!!

曾淇浩 發表於 2014-7-31 17:01:40

感謝分享~~感謝分享~~感謝分享~~感謝分享~~感謝分享~~
頁: [1]
查看完整版本: 線上HTML編輯器 CKeditor 4.3