ckeditor編輯器是現(xiàn)在N多站長(zhǎng)網(wǎng)站會(huì)使用到的一種編輯器了,下面我來介紹國(guó)內(nèi)流行的thinkphp整合ckeditor編輯器吧,有需要了解的朋友可學(xué)習(xí)。 下面說一下 thinkphp 中整合 ckeditor步驟1:下載編輯器http:///download 找到自己要用的版本,目前最新4 步驟2:解壓后重新命名文件夾為ckeditor放在項(xiàng)目公共目錄 我放在Public/ckeditor下 步驟3: 模板中這樣寫的 代碼如下 | 復(fù)制代碼 | <script type="text/javascript" src="__ROOT__/ckeditor/ckeditor.js"></script> |
設(shè)置編輯器 代碼如下 | 復(fù)制代碼 | <form action="{:u('Video/add')}" method="post" name="myform" id="myform" enctype="multipart/form-data" > <textarea name="content" id="content" ></textarea> <input type="submit" value="保存"> </form> <script type="text/javascript"> CKEDITOR.replace('content',{ toolbar : 'Full', uiColor : '#9AB8F3', height:'200' }); </script> |
并簡(jiǎn)單的配置編輯器的樣式。 需要和ckfinder聯(lián)合使用
|