Laravel-admin: Field type [editor] does not exist.

Created on 19 Nov 2018  ·  4Comments  ·  Source: z-song/laravel-admin

  • Laravel Version: 5.7.13
  • PHP Version: 7.2
  • Laravel-admin: 1.6.7

Description:

Got the error Field type [editor] does not exist. when trying to use editor field at the form.

Steps To Reproduce:

I use the following code from the official specification:

$form = new Form(new Page);
$form->editor('content');

Most helpful comment

Looks like it's been removed from the core field registration. Adding the following inside App\Admin\bootstrap.php (above the forget method) fixed for me.

Encore\Admin\Form::extend('editor', Encore\Admin\Form\Field\Editor::class);

All 4 comments

I've found the solution - editor and map field types are blocked by default in the package. Here is the code from the App\Admin\bootstrap.php:

Encore\Admin\Form::forget(['map', 'editor']);

I have removed editor from array but still getting the same error.

Looks like it's been removed from the core field registration. Adding the following inside App\Admin\bootstrap.php (above the forget method) fixed for me.

Encore\Admin\Form::extend('editor', Encore\Admin\Form\Field\Editor::class);

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sampanhuang picture sampanhuang  ·  12Comments

mjakub12 picture mjakub12  ·  9Comments

sdauma picture sdauma  ·  16Comments

z-song picture z-song  ·  66Comments

yang5664 picture yang5664  ·  10Comments