Giter VIP home page Giter VIP logo

ueditor-thinkphp's Introduction

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实现

ueditor-thinkphp's People

Contributors

eureka101v avatar

Watchers

James Cloos avatar Jian Guo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.