Giter Club home page Giter Club logo

ueditor's Introduction

UEditor extension for laravel-admin

这是一个 laravel-admin 扩展,用来将 UEditor 集成进 laravel-admin 的表单中,依赖 overtrue/laravel-ueditor 依赖 codingyu/laravel-ueditor

安装

composer require liaodan100/ueditor

发布资源

// V3.*
php artisan vendor:publish --provider='Codingyu\LaravelUEditor\UEditorServiceProvider'
// V2.*
php artisan vendor:publish --provider='Overtrue\LaravelUEditor\UEditorServiceProvider'

配置

config/admin.php文件的extensions,加上属于这个扩展的一些配置

    'extensions' => [

        'ueditor' => [

            // 如果要关掉这个扩展,设置为false
            'enable' => true,

            // 编辑器的前端配置 参考:http://fex.baidu.com/ueditor/#start-config
            'config' => [
                'initialFrameHeight' => 400, // 例如初始化高度
            ],
            // 'field_type' => '自定义名字'
        ]
    ]

后端配置 config/ueditor.php,参考 overtrue/laravel-ueditor codingyu/laravel-ueditor

使用

2.|3.

组件名可配置,默认 UEditor

在form表单中使用它:

$form->UEditor('content');
// options 中参数会覆盖 extensions.ueditor.config 中参数
$form->UEditor('content')->options(['initialFrameHeight' => 800]);

// 如果 extensions.ueditor.field_type 定义为 xxxEditor
// $form->xxxEditor('content');

1.*

在form表单中使用它:

$form->editor('content');
// options 中参数会覆盖 extensions.ueditor.config 中参数
$form->editor('content')->options(['initialFrameHeight' => 800]);

// 升级2.* 后,不改代码兼容 1.*:可以配置  extensions.ueditor.field_type 为 editor

大感谢

License

Licensed under The MIT License (MIT).

ueditor's People

Contributors

liaodan100 avatar

Watchers

 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.