所見即所得編輯器
(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大小可用如下方式,用表格設定其大小-->
- <textarea class="ckeditor" cols="40" id="editor1" name="content" rows="10">'.$content.'</textarea>
- </form>
-
複製代碼
|