Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

web990/Ueditor-thinkphp

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
10 Commits
 
 
 
 
 
 

Repository files navigation

Ueditor-thinkphp

Ueditor for thinkphp插件 兼容本地与sae平台 暂只支持thinkphp3.2后的版本

注意

会与TP的trace调试冲突,关闭trace后正常

使用说明

安装:

将Ueditor 目录下 Public,Thinkphp 文件夹与你的项目目录下的Public , Thinkphp文件夹合并,ueditor.json放置在你项目的配置文件夹

使用:

  • 给你的控制器添加ueditor方法
public function ueditor(){
    	$data = new \Org\Util\Ueditor();
		echo $data->output();
    }
  • 添加以下代码到你视图的view文件
    <js href="__PUBLIC__/js/jquery-2.0.2.js" />
    <js href="__PUBLIC__/ueditor/ueditor.config.js" />    
    <js href="__PUBLIC__/ueditor/ueditor.all.min.js" />
    <script>
    $(function(){
        var ue = UE.getEditor('container',{
            serverUrl :'{:U('模块/控制器/ueditor')}'
        });
    })
    </script>

上传的话本地最后会默认上传到项目目录下Uploads文件夹,sae平台会上传到名字为uploads的domain,如果想更改可通过配置Org\Util\Ueditor下的rootpath变量实现,上传子目录的更改可通过配置ueditor.json实现

About

Ueditor for thinkphp插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 50.7%
  • PHP 45.2%
  • CSS 3.9%
  • C 0.2%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.