Giter VIP home page Giter VIP logo

ueditor's Introduction

#Ueditor for laravel 4

Ueditor for laravel 4 对于国内最好用的富文本web编辑器ueditor的封装,方便使用 laravel 的朋友能够快速配置和使用,以及在线更新编辑器。

##特点

  1. 方便配置
  2. 随时更新
  3. 使用composer进行安装管理,国际标准,方便快捷

##Install 这里不详细介绍如何安装composer了,大家根据链接自行安装吧!

命令行下直接 composer require "zhuzhichao/ueditor" ,版本的话无特殊需求则选择 dev-master,当前使用的Ueditor版本为1.4.3

##Config 1.在 app/config/app.phpproviders 数组中添加

'Zhuzhichao\Ueditor\UeditorServiceProvider',

aliases 数组中添加

'Ueditor'        => 'Zhuzhichao\Ueditor\Ueditor',

同时请确保 app.php 中url 的值为web的地址, 同时别忘了composer dumpautoload

2.命令行下执行如下命令

php artisan config:publish zhuzhichao/ueditor
php artisan asset:publish zhuzhichao/ueditor

3.配置文件的修改: 需要个性配置请到这里修改 app/config/packages/zhuzhichao/ueditor/config.php

4.终于配置完成了

##Use 1.这里封装了以下方法可以方便大家添加编辑器的css和js,以及编辑器,直接在 blade 的模版中使用

// 添加css样式
{{ Ueditor::css() }}
// 添加编辑器样式
// 该方法有两个参数,
// 第一个为显示的编辑器内容【可选】
// 第二个为编辑器的attribute数组,可以控制编辑器的id,style,class等内容【可选】,默认id为myEditor
// example: Ueditor::content('', ['id'=>'textid', 'class'=>'text-ueditor'])
{{ Ueditor::content() }}
// 得到 <script type='text/plain'  id='textid' class='text-ueditor'></script>
// 添加js
{{ Ueditor::js() }}
// 添加自己的JS代码,初始化编辑器
var ue = UE.getEditor('editor');

2.文件的上传位置为 public/upload 文件夹下,请确保有写入权限

3.好嘞,终于大功告成,你可以参考这里来使用编辑器的一些方法了。

##Bug 如果你遇到了问题,可以先尝试 composer update 来更新一下。如果问题依旧,请提交issue,我会及时回复。当然如果你能提交Pull Requests更好,^^

##Contributing 有什么新的想法和建议,欢迎提交issue或者Pull Requests

##License MIT

ueditor's People

Contributors

zhichao-poper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ueditor's Issues

IE使用图片上传出错

测试环境:Windows XP/7
浏览器版本:IE全系列

在使用“图片上传”功能时,提示下载controller.json,上传的gif图一直在转。
查看upload目录,实际上图片已上传。
是否和Route或者json有关呢?

$EDITORUI 跨域出错

Use of attributes' nodeValue attribute is deprecated. Use value instead. ueditor.all.min.js:554:0
Error: Permission denied to access property '$EDITORUI' internal.js:4:4
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery-1.10.2.min.js:1:0
ReferenceError: $G is not defined

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.