search
Homephp教程php手册PHP editor函数调用可视化编辑器

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

Jun 13, 2016 am 11:12 AM
phpintroducefunctionFunctionVisualizationWillpowerfuluseditortransfer

我们在这里将会为大家介绍一种功能强大的函数,专门用来进行可视化编辑器的调用。这一函数就是

PHP editor函数语法

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

$textareaid 为文本框 id

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

$width 指定编辑器的宽度

$height 指定编辑器的高度

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

<ol class="dp-xml">
<li class="alt"><span><span class="tag"><span> </span><span class="tag-name">textarea</span><span>   </span></span></span></li>
<li>
<span class="attribute">name</span><span>=</span><span class="attribute-value">"article[content]"</span><span>   </span>
</li>
<li class="alt">
<span class="attribute">id</span><span>=</span><span class="attribute-value">"content"</span><span> </span><span class="attribute">cols</span><span>=</span><span class="attribute-value">"60"</span><span> <br></span><span class="attribute">rows</span><span>=</span><span class="attribute-value">"4"</span><span class="tag">></span><span> </span>
</li>
<li><span class="tag"><span> /textarea</span><span class="tag">></span><span> </span></span></li>
<li class="alt"><span class="tag"><span> ?=editor("content",<br>"phpcms",550,400)  </span></span></li>
<li>
<span class="tag">?></span><span> </span>
</li>
</ol>

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


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.