hongyukeji/laravel-simditor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hongyukeji/laravel-simditor

最新稳定版本:v1.1.2

Composer 安装命令:

composer require hongyukeji/laravel-simditor

包简介

laravel simditor editor

README 文档

README

laravel simditor editor.

Installing

$ composer require hongyukeji/laravel-simditor
$ php artisan vendor:publish --provider="Hongyukeji\LaravelSimditor\SimditorServiceProvider"

Usage

  • in your block just put
@include('Simditor::assets')
<!-- 加载编辑器的容器 -->
<textarea id="editor" name="content" rows="6" placeholder="">
    这里写你的初始化内容
</textarea>

<!-- 实例化编辑器 -->
<script>
    $(document).ready(function() {
        var editor = new Simditor({
            textarea: $('#editor'),
            upload: {
                url: '上传图片地址',
                params: {
                    _token: 'Csrf Token'
                },
                fileKey: 'upload_file',
                connectionCount: 3,
                leaveConfirm: '文件上传中,关闭此页面将取消上传。'
            },
            pasteImage: true,
        });
    });
</script>

<!-- or -->

<!-- 加载编辑器的容器 -->
<script id="editor" name="content" type="text/plain">
    这里写你的初始化内容
</script>

<!-- 实例化编辑器 -->
<script>
    $(document).ready(function() {
      var editor = new Simditor({
        textarea: $('#editor'),
      });
    });
</script>
echo json_encode([
    'success' => true,
    'msg' => '图片上传错误信息',
    'file_path' => '/upload/2018_10_11/1.jpg'
]);

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT

统计信息

  • 总下载量: 2.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-18