mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°5298 - Fix HTML attribute name always empty in RichText block
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user