老师今天给我们讲了在线编辑器,我认为在它很神奇,它不用你手动的在代码中写出直接在前台就可以编辑,客户想要什么效果都可以自己实现,就像是word2003一样。接下来我想简单的介绍下我们今天学的在线编辑器。
常见的 在线编辑器有Fckeditor、eWebeditor、FreeTextBox、ckeditor等多种
优点:可以自动转换html代码、简单易用、方便快捷、兼容易和
下载一个 TestFckeditor文件,它使用来存放格式的,在调用一下TestFckeditor/ckeditor.php引入你写的文件里
下面是简单实现的一个在线编辑器
<html>
<head>
<title>在线编辑器</title>
</head>
<body><form action="disp.php" method="POST">
标题:<input name="input1" type="text">
<?php
require("fckeditor/fckeditor.php");
$FCKeditor = new FCKeditor("content");
//
$FCKeditor -> BasePath='./fckeditor/';
//工具按钮设置
$FCKeditor -> ToolbarSet="Default";
$FCKeditor->width="200px";
$FCKeditor->height="500px";
$FCKeditor->create();
?>
<input type="submit" name="sub" value="提交">
</form>
</body>
</html>