PHP editor函数调用可视化编辑器

我们在这里将会为大家介绍一种功能强大的函数,专门用来进行可视化编辑器的调用。这一函数就是PHP editor函数。希望对大家有所帮助。#t#

PHP editor函数语法

editor($textareaid = 'content', $toolbar = 'phpcms', $width = 500, $height = 400)

$textareaid 为文本框 id

$toolbar 为工具按钮样式,目前有 phpcms 和 introduce 两种可以选择,一般较大的内容编辑框用 phpcms,而简要介绍则用 introduce

$width 指定编辑器的宽度

$height 指定编辑器的高度

例如:在文章模块发布文章时的内容编辑采用可视化编辑器的PHP editor函数代码如下

 

 
 
 
  1. < textarea   
  2. name="article[content]"   
  3. id="content" cols="60" 
    rows="4"> 
  4. < /textarea> 
  5. < ?=editor("content",
    "phpcms",550,400)  
  6. ?> 

以上就是PHP editor函数的相关使用方法介绍。

THE END