Home  >  Article  >  Backend Development  >  PHP editor function calls visual editor_PHP tutorial

PHP editor function calls visual editor_PHP tutorial

WBOY
WBOYOriginal
2016-07-15 13:35:041692browse

Here we will introduce to you a powerful function specially used to call the visual editor. This function is

PHP editor function syntax

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

$textareaid is the text box id

$toolbar is the tool button style. There are currently two options: phpcms and introduce. Generally, phpcms is used for larger content editing boxes, and a brief introduction Then use introduce

$width to specify the width of the editor

$height to specify the height of the editor

For example: when publishing articles in the article module, a visual editor is used for content editing. The PHP editor function code is as follows

<ol class="dp-xml">
<li class="alt"><span><span class="tag"><</span><span> </span><span class="tag-name">textarea</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></span></li>
<li>
<span class="tag"><</span><span> /textarea</span><span class="tag">></span><span> </span>
</li>
<li class="alt">
<span class="tag"><</span><span> ?=editor("content",<br />"phpcms",550,400)  </span></li><li><span class="tag">?></span><span> </span>
</li>
</ol>

The above is an introduction to the relevant usage of the PHP editor function.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445924.htmlTechArticleHere we will introduce to you a powerful function specially used to call the visual editor . This function is the PHP editor function syntax editor($textareaid = 'co...
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