From 4764553e08acb480650f00d8a9c5831c1062a2d2 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 24 May 2024 09:30:02 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B05298=20-=20Fix=20HTML=20attribute=20name?= =?UTF-8?q?=20always=20empty=20in=20RichText=20block?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Component/Input/RichText/RichText.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sources/Application/UI/Base/Component/Input/RichText/RichText.php b/sources/Application/UI/Base/Component/Input/RichText/RichText.php index 408419cd9..ef19243ae 100644 --- a/sources/Application/UI/Base/Component/Input/RichText/RichText.php +++ b/sources/Application/UI/Base/Component/Input/RichText/RichText.php @@ -28,6 +28,11 @@ class RichText extends UIBlock 'js/highlight/styles/obsidian.min.css', ]; + /** + * @var string|null + * @since 3.2.0 + */ + protected $sName; /** @var string|null */ protected $sValue; /** @var array Configuration parameters for the CKEditor instance used with Richtext block */ @@ -37,18 +42,30 @@ class RichText extends UIBlock * RichText constructor. * * @param string|null $sId + * @param string|null $sName */ - public function __construct(?string $sId = null) + public function __construct(?string $sId = null, ?string $sName = null) { parent::__construct($sId); + $this->sName = $sName; $this->sValue = null; $this->aConfig = CKEditorHelper::GetCkeditorPref(); - // add CKEditor translations resource + // Add CKEditor translations resource $sLanguage = strtolower(explode(' ', Dict::GetUserLanguage())[0]); $this->AddJsFileRelPath('js/ckeditor/build/translations/' . $sLanguage . '.js'); } + /** + * @see static::$sName + * @return string|null + * @since 3.2.0 + */ + public function GetName(): ?string + { + return $this->sName; + } + /** * @see static::$sValue * @return string|null