GithubHelp home page GithubHelp logo

sniper999999 / dact-admin-wang-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from puzzle9/dact-admin-wang-editor

0.0 1.0 0.0 60 KB

WangEditor extension for dcat-admin

License: MIT License

Blade 11.97% PHP 88.03%

dact-admin-wang-editor's Introduction

Dcat Admin扩展 - WangEditor

注: 使用此扩展将会导致 /admin/helpers/extensions 打开报错 因 配置文件不是 key / value 格式

WangEditor 4.x 版本编辑器

http://www.wangeditor.com/doc/

安装

composer require puzzle9/dact-admin-wang-editor
php artisan admin:import dact-admin-wang-editor

config/admin-extensions.php

    'extensions' => [
        'dact-admin-wang-editor' => [
            'enable' => true,
            // 储存 disk
            'disk' => 'public',
            // http://www.wangeditor.com/doc/pages/03-配置菜单/
            'config' => [
                // 设置默认 zIndex
                'zIndex' => 1,
                // 粘贴样式的过滤
                'pasteFilterStyle' => true,
                // 粘贴内容中的图片
                'pasteIgnoreImg' => true,
                // 上传图片大小
                'uploadImgMaxSize' => 5 * 1024 * 1024, // 2M
                // 一次最多能传几张图片
                'uploadImgMaxLength' => 5,
                // 插入网络图片的功能
                'showLinkImg' => false,
                // 菜单
                'menus' => [
                    'head',
                    'bold',
                    'customFontSize',
                    'fontName',
                    'italic',
                    'underline',
                    'strikeThrough',
                    'indent',
                    'lineHeight',
                    'foreColor',
                    'backColor',
                    // 'link',
                    'list',
                    'justify',
                    // 'quote',
                    // 'emoticon',
                    'image',
                    // 'video',
                    // 'table',
                    // 'code',
                    'splitLine',
                    'undo',
                    'redo',
                ],
            ],
        ],
    ],

使用

基本使用

$form->editor('content')->height(500)->required();

修改编辑器高度

$form->editor('content')->height(500);

修改编辑器zIndex

$form->editor('content')->zIndex(1);

dact-admin-wang-editor's People

Contributors

puzzle9 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.