Skip to content

Commit bf4515c

Browse files
authored
Enhancement: swap tools merge order (#18361)
1 parent 258b7d4 commit bf4515c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/forms/src/Components/RichEditor.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -600,14 +600,6 @@ public function getTools(): array
600600
{
601601
return array_reduce(
602602
[
603-
...array_reduce(
604-
$this->getPlugins(),
605-
fn (array $carry, RichContentPlugin $plugin): array => [
606-
...$carry,
607-
...$plugin->getEditorTools(),
608-
],
609-
initial: [],
610-
),
611603
...array_reduce(
612604
$this->tools,
613605
function (array $carry, RichEditorTool | Closure $tool): array {
@@ -622,6 +614,14 @@ function (array $carry, RichEditorTool | Closure $tool): array {
622614
},
623615
initial: [],
624616
),
617+
...array_reduce(
618+
$this->getPlugins(),
619+
fn (array $carry, RichContentPlugin $plugin): array => [
620+
...$carry,
621+
...$plugin->getEditorTools(),
622+
],
623+
initial: [],
624+
),
625625
],
626626
fn (array $carry, RichEditorTool $tool): array => [
627627
...$carry,

0 commit comments

Comments
 (0)