You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Laravel项目Open Admin面板集成CKeditor失败求助

问题:Open Admin集成CKeditor失败无报错,显示异常

我在Laravel项目中采用Open Admin作为后台管理面板,为实现内容编辑功能,按照官方文档尝试集成CKeditor,但未成功,且无任何报错信息,当前显示效果异常:
CKeditor显示异常截图

环境配置

  • PHP: ^8.1
  • laravel/framework: ^10.10

BlogController代码

<?php

namespace App\Admin\Controllers;

use OpenAdmin\Admin\Controllers\AdminController;
use OpenAdmin\Admin\Form;
use OpenAdmin\Admin\Grid;
use OpenAdmin\Admin\Show;
use \App\Models\Blog;

class BlogController extends AdminController
{
    /**
     * Title for current resource.
     *
     * @var string
     */
    protected $title = 'Blog';

    /**
     * Make a grid builder.
     *
     * @return Grid
     */
    protected function grid()
    {
        $grid = new Grid(new Blog());

        $grid->column('id', __('Id'));
        $grid->column('title', __('Title'));
        $grid->column('post_image', __('Post image'));
        $grid->column('writer_name', __('Writer name'));
        $grid->column('writer_image', __('Writer image'));
        $grid->column('published_date', __('Published date'));
        $grid->column('description', __('Description'));
        // $grid->column('page_image', __('Page image'));
        // $grid->column('tags', __('Tags'));
        $grid->column('created_at', __('Created at'));
        $grid->column('updated_at', __('Updated at'));

        return $grid;
    }

    /**
     * Make a show builder.
     *
     * @param mixed $id
     * @return Show
     */
    protected function detail($id)
    {
        $show = new Show(Blog::findOrFail($id));

        $show->field('id', __('Id'));
        $show->field('title', __('Title'));
        $show->field('post_image', __('Post image'));
        $show->field('writer_name', __('Writer name'));
        $show->field('writer_image', __('Writer image'));
        $show->field('published_date', __('Published date'));
        $show->field('description', __('Description'));
        // $show->field('page_image', __('Page image'));
        // $show->field('tags', __('Tags'));
        $show->field('created_at', __('Created at'));
        $show->field('updated_at', __('Updated at'));

        return $show;
    }

    /**
     * Make a form builder.
     *
     * @return Form
     */
    protected function form()
    {
        $form = new Form(new Blog());
        // $form->ckeditor('content');

        $form->text('title', __('Title'));
        $form->text('post_image', __('Post image'));
        $form->text('writer_name', __('Writer name'));
        $form->text('writer_image', __('Writer image'));
        $form->text('published_date', __('Published date'));
        // $form->text('page_image', __('Page image'));
        // $form->textarea('description', __('Description'));
        // $form->text('tags', __('Tags'));
        $form->ckeditor('description', __('Description'));

        return $form;
    }
}

已尝试操作与预期结果

  • 已尝试:使用Open Admin内置的CKeditor工具实现内容发布功能
  • 预期结果:CKeditor正常加载并可用,但目前无任何效果,也未收到报错信息

请求协助

恳请协助解决CKeditor集成到Open Admin面板的问题;若无法解决,也请告知Laravel第三方插件集成到后台面板的通用流程。

内容的提问来源于stack exchange,提问作者Ali Hassan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 06:55:19