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

joernroeder picture joernroeder  ·  3Comments

greentornado picture greentornado  ·  3Comments

vlongen picture vlongen  ·  3Comments

piian picture piian  ·  3Comments

amun1303 picture amun1303  ·  3Comments