Skip to content

Commit

Permalink
Prepare 11.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed Nov 3, 2021
1 parent 08d3fdd commit 4ed02a9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 11.2.0

- Added `delay` to wysiwyg editor field

## 11.1.0

- Added `enableOpacity` to color picker field
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "11.1-dev"
"dev-master": "11.2-dev"
}
},
"autoload": {
Expand Down
16 changes: 8 additions & 8 deletions src/Fields/WysiwygEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ class WysiwygEditor extends Field

protected $type = 'wysiwyg';

/** @return static */
public function delay(): self
{
$this->config->set('delay', true);

return $this;
}

/** @return static */
public function mediaUpload(bool $mediaUpload): self
{
Expand Down Expand Up @@ -61,12 +69,4 @@ public function toolbar(string $toolbar): self

return $this;
}

/** @return static */
public function delay(): self
{
$this->config->set('delay', true);

return $this;
}
}
12 changes: 6 additions & 6 deletions tests/Fields/WysiwygEditorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public function testType()
$this->assertSame('wysiwyg', $field['type']);
}

public function testDelay()
{
$field = WysiwygEditor::make('Wysiwyg Editor Delay')->delay()->toArray();
$this->assertTrue($field['delay']);
}

public function testMediaUpload()
{
$field = WysiwygEditor::make('Wysiwyg Editor Media Upload')->mediaUpload(false)->toArray();
Expand All @@ -47,10 +53,4 @@ 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']);
}
}

0 comments on commit 4ed02a9

Please sign in to comment.