百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>网页制作> 新浪编辑器使用方法
分享文章到:

新浪编辑器使用方法

发布时间:01/14 来源: 浏览: 关键词:

 

header('content-type:text/html;charset=utf-8;');
include_once('sinaeditor.class.php教程');
/*********************************************************************************/
//这里判断表单提交动作,然后赋值给$content;
if($_get['act']=='subok') die(htmlspecialchars($content=$_post['gently_editor']));
/*********************************************************************************/
$editor=new sinaeditor('gently_editor');
$editor->value='<img src="../logo.gif"><h2>新浪博客编辑器php图片上传版!</h2>';
$editor->basepath='.';
$editor->height=500;
$editor->width=650;
$editor->autosave=false;
?>
<div align="center">
<form name="form1" id="form1" method="post" action="index.php?act=subok">
<?php
 $editor->create();
?><br />
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</div>

<?
class sinaeditor{
 var $basepath;
 var $width;
 var $height;
 var $ename;
 var $value;
 var $autosave;
 function sinaeditor($ename){
  $this->ename=$ename;
  $this->basepath='.';
  $this->autosave=false;
  $this->height=460;
  $this->width=630;
 }
 function __construct($ename){
  $this->sinaeditor($ename);
 }
 function create(){
  $readcookie=$this->autosave?1:0;
  print <<<eot
  <textarea name="{$this->ename}" id="{$this->ename}" style="display:none;">{$this->value}</textarea>
  <iframe src="{$this->basepath}/edit/editor.htm?id={$this->ename}&readcookie={$readcookie}" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="{$this->width}" height="{$this->height}"></iframe>
eot;
 }
}
?>

编辑器下载地址
http://down.111cn.net/webedit/2010/0819/20307.html

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有8人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板