掃二維碼與項目經(jīng)理溝通
我們在微信上24小時期待你的聲音
解答本文疑問/技術(shù)咨詢/運營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流
我們在這里將會為大家介紹一種功能強大的函數(shù),專門用來進行可視化編輯器的調(diào)用。這一函數(shù)就是PHP editor函數(shù)。希望對大家有所幫助。#t#

PHP editor函數(shù)語法
editor($textareaid = 'content', $toolbar = 'phpcms', $width = 500, $height = 400)
$textareaid 為文本框 id
$toolbar 為工具按鈕樣式,目前有 phpcms 和 introduce 兩種可以選擇,一般較大的內(nèi)容編輯框用 phpcms,而簡要介紹則用 introduce
$width 指定編輯器的寬度
$height 指定編輯器的高度
例如:在文章模塊發(fā)布文章時的內(nèi)容編輯采用可視化編輯器的PHP editor函數(shù)代碼如下
- < textarea
- name="article[content]"
- id="content" cols="60"
rows="4">- < /textarea>
- < ?=editor("content",
"phpcms",550,400)- ?>
以上就是PHP editor函數(shù)的相關(guān)使用方法介紹。

我們在微信上24小時期待你的聲音
解答本文疑問/技術(shù)咨詢/運營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流