super-admin-org/ckeditor 问题修复 & 功能扩展

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

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

super-admin-org/ckeditor

最新稳定版本:v1.0.4

Composer 安装命令:

composer require super-admin-org/ckeditor

包简介

Integrate CKEDITOR into super-admin

README 文档

README

Super Admin Extension Latest Version Total Downloads License

CKEditor Extension for Super Admin

A powerful Super Admin extension that seamlessly integrates the CKEditor 4 WYSIWYG editor into your admin panel forms. Replace plain textareas with a full-featured rich text editor — complete with formatting tools, image uploads, link management, and media browser integration.

Screenshot

field-ckeditor

Features

  • Rich Text Editing — Full WYSIWYG editor with bold, italic, lists, headings, tables, and more
  • Media Browser Integration — Browse and insert images directly from Super Admin's built-in media manager
  • Link Management — Insert and edit links with a user-friendly dialog
  • Global & Per-Field Configuration — Set defaults globally or customize each editor instance
  • Multi-Language Support — Configure the editor UI in any supported language
  • Custom Styling — Apply your own CSS to match the editor content with your frontend design
  • Auto-Discovery — Works out of the box with Laravel's package auto-discovery
  • Secure — Ships with CKEditor 4.25+, patched against known XSS vulnerabilities

Requirements

Installation

Step 1: Install the package via Composer:

composer require super-admin-org/ckeditor

Step 2: Publish the CKEditor assets:

php artisan vendor:publish --tag=super-admin-ckeditor

That's it! The service provider is auto-discovered by Laravel.

Configuration

Add your editor settings in the extensions section of config/admin.php:

'extensions' => [

    'ckeditor' => [

        // Set to false to disable this extension
        'enable' => true,

        // Global editor configuration
        'config' => [
            'language'    => 'en',
            'height'      => 500,
        ]
    ]
]

Available Configuration Options

Option Type Description
enable bool Enable or disable the extension
config.language string Editor UI language ('en', 'de', 'fr', 'es', etc.)
config.height int Editor height in pixels
config.contentsCss string Path to custom CSS applied inside the editor

For all available CKEditor options, see the CKEditor 4 Documentation.

Usage

Basic Usage

Add a CKEditor field to any Super Admin form:

$form->ckeditor('content');

With Custom Options

Override global config on a per-field basis using the options() method:

$form->ckeditor('content')->options([
    'lang'   => 'fr',
    'height' => 500,
]);

With Custom Content Styling

Match the editor's content area with your frontend styles:

$form->ckeditor('content')->options([
    'contentsCss' => '/css/frontend-body-content.css',
]);

Full Form Example

Here's a complete example of a blog post form with a CKEditor field:

protected function form()
{
    $form = new Form(new Post());

    $form->text('title', 'Title')->required();
    $form->text('slug', 'Slug')->required();
    $form->image('thumbnail', 'Thumbnail');

    $form->ckeditor('body', 'Content')->options([
        'height' => 600,
    ]);

    $form->select('status', 'Status')->options([
        'draft'     => 'Draft',
        'published' => 'Published',
    ]);

    $form->datetime('published_at', 'Publish Date');

    return $form;
}

Image & Media Browser

The extension integrates with Super Admin's media manager out of the box. When inserting an image or link in the editor, users can browse and select files from the media library — no extra configuration needed.

Troubleshooting

CKEditor not showing up

If the editor doesn't appear after installation, clear Laravel's compiled services and cached packages:

php artisan optimize:clear

Then re-publish the assets:

php artisan vendor:publish --tag=super-admin-ckeditor --force

Assets not loading

Make sure your web server can serve files from the public/vendor/ directory. After publishing, the CKEditor files should be located at:

public/vendor/super-admin-org/ckeditor/

Updating

To update the package and its CKEditor assets:

composer update super-admin-org/ckeditor
php artisan vendor:publish --tag=super-admin-ckeditor --force

License

Licensed under The MIT License (MIT).

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固