mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +01:00
Added workaround for bug with CKEdito being too tall
This commit is contained in:
parent
f80f79a98a
commit
8bbcafe1c0
@ -585,13 +585,19 @@ class html
|
|||||||
// run content through htmlpurifier
|
// run content through htmlpurifier
|
||||||
if ($_purify && !empty($_content)) $_content = self::purify($_content);
|
if ($_purify && !empty($_content)) $_content = self::purify($_content);
|
||||||
$oCKeditor = self::initCKEditor($_height, $_mode);
|
$oCKeditor = self::initCKEditor($_height, $_mode);
|
||||||
|
|
||||||
return $oCKeditor->editor($_name, $_content);
|
/* Resize the editor to the actual size delivered by the $_height parameter once it is initialized */
|
||||||
|
$pxheight = (strpos('px', $_height) === false) ? (empty($_height)?400:$_height) : str_replace('px', '', $_height);
|
||||||
|
$events['instanceReady'] = 'function (ev) {
|
||||||
|
ev.editor.resize("100%", '.str_replace('px', '', $pxheight).');
|
||||||
|
}';
|
||||||
|
|
||||||
|
return $oCKeditor->editor($_name, $_content, null, $events);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function &initCKEditor($_height, $_mode)
|
static function &initCKEditor($_height, $_mode)
|
||||||
{
|
{
|
||||||
include_once(EGW_INCLUDE_ROOT."/phpgwapi/js/ckeditor3/ckeditor.php");
|
include_once(EGW_INCLUDE_ROOT."/phpgwapi/js/ckeditor3/ckeditor_php5.php");
|
||||||
|
|
||||||
//Get the ckeditor base url
|
//Get the ckeditor base url
|
||||||
$basePath = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/ckeditor3/';
|
$basePath = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/js/ckeditor3/';
|
||||||
|
Loading…
Reference in New Issue
Block a user