项目作者: menthe

项目描述 :
Aliyun OSS Ueditor, 支持Aliyun OSS 的 UEditor.
高级语言: JavaScript
项目地址: git://github.com/menthe/aliyun-ueditor.git
创建时间: 2016-09-14T03:23:01Z
项目社区:https://github.com/menthe/aliyun-ueditor

开源协议:MIT License

下载


Laravel 5 UEditor

UEditor 是由百度web前端研发部开发所见即所得富文本web编辑器

此包为laravel5的支持,新增多语言配置,可自由部署前端代码,默认基于 UEditor 1.4.3.1

UEditor 前台文件完全无修改,可自由gulp等工具部署到生产环境

根据系统的config.app.locale自动切换多语言. 暂时只支持 en,zh_CN,zh_TW

支持本地和阿里云存储,默认为本地上传 public/uploads

Notice

For Laravel5.1 LTS, please use v0.1.1.
For Laravel5.3 or 5.4, please use v0.1.2.

Requirement

  • Lavavel5.1 LTS, for Lavavel5.3, I do not test, you may have a try.
  • PHP5.6+, PHP7.0 is suitable
  • Composer

Installation

  • Run the command in your laravel project home.
  1. composer require menthe/aliyun-ueditor -vvv
  • Copy the provider line into your config/app.php
  1. Harris\UEditor\UEditorServiceProvider::class,
  • Then run the command.
  1. php artisan vendor:publish
  • Change the config file -> config/UEditorUpload.php

  • Include the line in the blade template file, like template.blade.php, and you have the ueditor static file included.

  1. @include('ueditor::head');
  • Init the ueditor in Javascript.
  1. <!-- 加载编辑器的容器 -->
  2. <script id="container" name="content" type="text/plain">
  3. 这里写你的初始化内容
  4. </script>
  5. <!-- 实例化编辑器 -->
  6. <script type="text/javascript">
  7. var ue = UE.getEditor('container');
  8. ue.ready(function() {
  9. ue.execCommand('serverparam', '_token', '{{ csrf_token() }}');//此处为支持laravel5 csrf ,根据实际情况修改,目的就是设置 _token 值.
  10. });
  11. </script>

ChangeLog

  • v0.1 First Release, just use for myself.
  • v0.1.1 正式发布,测试通过,完善文档。
  • v0.1.2 匹配Laravel5.3和5.4

License

Laravel 5 UEditor is licensed under The MIT License (MIT).