PHP editor函數(shù)調(diào)用可視化編輯器
我們在這里將會為大家介紹一種功能強(qiáng)大的函數(shù),專門用來進(jìn)行可視化編輯器的調(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)使用方法介紹。