diff --git a/src/Fields/WysiwygEditor.php b/src/Fields/WysiwygEditor.php index f3a3edef..cc4070a4 100644 --- a/src/Fields/WysiwygEditor.php +++ b/src/Fields/WysiwygEditor.php @@ -61,4 +61,12 @@ public function toolbar(string $toolbar): self return $this; } + + /** @return static */ + public function delay(): self + { + $this->config->set('delay', true); + + return $this; + } } diff --git a/tests/Fields/WysiwygEditorTest.php b/tests/Fields/WysiwygEditorTest.php index 9f9d8722..38beaebe 100644 --- a/tests/Fields/WysiwygEditorTest.php +++ b/tests/Fields/WysiwygEditorTest.php @@ -39,7 +39,7 @@ public function testTabs() $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Invalid argument tabs [test].'); - $field = WysiwygEditor::make('Wysiwyg Editor Inavlid Tabs')->tabs('test')->toArray(); + $field = WysiwygEditor::make('Wysiwyg Editor Invalid Tabs')->tabs('test')->toArray(); } public function testToolbar() @@ -47,4 +47,10 @@ public function testToolbar() $field = WysiwygEditor::make('Wysiwyg Editor Toolbar')->toolbar('basic')->toArray(); $this->assertSame('basic', $field['toolbar']); } + + public function testDelay() + { + $field = WysiwygEditor::make('Wysiwyg Editor Delay')->delay()->toArray(); + $this->assertSame(true, $field['delay']); + } }