- Fix #3803: Invalid editor preset handling

- Fix: Invalid editor placeholder handling
This commit is contained in:
buddh4 2020-01-20 17:09:00 +01:00
parent af3849a2a4
commit 346c29fdf2
3 changed files with 17 additions and 4 deletions

View File

@ -27,6 +27,8 @@ HumHub Change Log (DEVELOP)
- Enh: Notification targets can be deactivated or overwritten by configuration
- Fix #3810: Print Media Cluttered by HREF Content
- Enh: Added further print style enhancements
- Fix #3803: Invalid editor preset handling
- Fix: Invalid editor placeholder handling
1.4.0-beta.2
------------

View File

@ -156,14 +156,19 @@ abstract class AbstractRichText extends JsWidget
*/
public function getData()
{
return [
$result = [
'exclude' => $this->exclude,
'include' => $this->include,
'plugin-options' => $this->pluginOptions,
'preset' => $this->preset,
'edit' => $this->edit,
'ui-richtext' => true
];
if(!empty($this->preset)) {
$result['preset'] = $this->preset;
}
return $result;
}
/**

View File

@ -238,12 +238,18 @@ class AbstractRichTextEditor extends JsInputWidget
'exclude' => $this->exclude,
'include' => $this->include,
'mentioning-url' => $this->getMentioningUrl(),
'placeholder' => $this->placeholder,
'plugin-options' => $this->pluginOptions,
'preset' => $this->preset,
'focus' => $this->focus
];
if(!empty($this->preset)) {
$result['preset'] = $this->preset;
}
if(!empty($this->placeholder)) {
$result['placeholder'] = $this->placeholder;
}
if ($this->disabled) {
$result['disabled'] = true;
$result['disabled-text'] = $this->disabledText;