Fix RichText post process event pass data (#5615)

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Yuriy Bakhtin 2022-03-29 19:46:02 +03:00 committed by GitHub
parent 33f263a830
commit d0a35246f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -2,6 +2,7 @@
--------------------------
- Fix #5603: Syntax error in database view installer
- Fix #5608: Remove duplicated field "Hostname" on install
- Fix #5612: Fix RichText post process event pass data
- Enh #5610: Show menu item "Add Licence Key" for purchased modules
- Enh #5599: Introduce a variables in the Space model to call ProfileImage and ProfileBannerImage classes

View File

@ -238,13 +238,10 @@ abstract class AbstractRichText extends JsWidget
$record->updateAttributes([$attribute => $text]);
}
$evt = new Event(['result' => ['text' => $text, 'record' => $record, 'attribute' => $attribute]]);
Event::trigger(static::class, static::EVENT_POST_PROCESS, $evt);
Event::trigger(static::class, static::EVENT_POST_PROCESS,
new Event(['data' => ['text' => $text, 'record' => $record, 'attribute' => $attribute]]));
$result['text'] = $text;
return $result;
return $evt->result;
}
/**