search
Homephp教程php手册百度 UEditor 简单安装调试和调用,网上其它的教程太官方了,不适合新手,ueditor安装调试

百度 UEditor 简单安装调试和调用,网上其它的教程太官方了,不适合新手,ueditor安装调试

对于新手来说,只要能实现功能即可,其它设置完全默认。

预览图:

1.首先 到官网下载,这个不多说。下载后解压到网站你想要的目录,我这里放到根目录下在你需要使用编辑器的地方,插入如下HTML代码:

<!-- 加载编辑器的容器 -->
<!-- 以下脚本中增加文本为初始化内容 -->
    <script id="container" name="sb_remarks" type="text/plain">$sb_remarks=$_POST['sb_remarks'];

 ================================

下面是我的完整事例代码:

index.html:

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus&reg;">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>设备档案</title>
 </head>
 <body>
<form method="post" action="s.php" name="search" /> 
<input name="search" type="text" value="" size="15" />  
<input type="submit" value="Search" /> 
</form>
<br/>
<hr/>
添加设备
<div>
 <form action="sb_add.php" method="post">
设备名称:<input type="text" name="sb_name" /><br/>
编码型号:<input type="text" name="sb_numandtype" /><br/>
生产厂家:<input type="text" name="sb_home" /><br/>
启用日期:<input type="text" name="sb_usedate" /><br/>
安装位置:<input type="text" name="sb_address" /><br/>
<!--更新日期:<input type="text" name="sb_updatetime" /><br/>-->
<!--
<input type="text" name="sb_remarks" />
-->
<!-- 加载编辑器的容器 -->
<!-- 以下脚本中增加文本为初始化内容 -->
    <script id="container" name="sb_remarks" type="text/plain"><?php
$con = mysql_connect("localhost","root","110");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_query("set names 'utf8'",$con);
mysql_select_db("bzec", $con);

$sb_name=$_POST['sb_name'];
$sb_numandtype=$_POST['sb_numandtype'];
$sb_home=$_POST['sb_home'];
$sb_usedate=$_POST['sb_usedate'];
$sb_address=$_POST['sb_address'];
//$sb_updatetime=$_POST['sb_updatetime'];
$sb_updatetime=date("Y-m-d G:i:s");
$sb_remarks=$_POST['sb_remarks'];

//$nikename= trim($nikename);

/*  
if (!$nikename || !$email) //判断是否为空
{
echo '不能为空';
exit;
}
*/

$sql="INSERT INTO shebeidangan (sb_name,sb_numandtype,sb_home,sb_usedate,sb_address,sb_updatetime,sb_remarks)
VALUES
('$sb_name','$sb_numandtype','$sb_home','$sb_usedate','$sb_address','$sb_updatetime','$sb_remarks')";
  
  
if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo "ADD OK";
  
mysql_close($con)
?>

 3.如果要修改 编辑器默认字体大小的话,在编辑器UEditor目录,ueditor.all.js文件里面查找“字体” ,就可以找到修改字号和字体的地方

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

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),

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft