Commit b8ca346a authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add fixed height option to textbox block editor; document in config-defaults


(Part of workaround for bug #530656)
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent b686a33e
......@@ -72,13 +72,16 @@ class PluginBlocktypeTextbox extends SystemBlocktype {
public static function instance_config_form($instance) {
$configdata = $instance->get('configdata');
$h = param_integer('cfheight', 0);
if (!$height = get_config('blockeditorheight')) {
$cfheight = param_integer('cfheight', 0);
$height = $cfheight ? $cfheight * 0.7 : 150;
}
return array(
'text' => array(
'type' => 'wysiwyg',
'title' => get_string('blockcontent', 'blocktype.textbox'),
'width' => '100%',
'height' => ($h ? $h * 0.7 : 150) . 'px',
'height' => $height . 'px',
'defaultvalue' => isset($configdata['text']) ? $configdata['text'] : '',
),
);
......
......@@ -225,3 +225,15 @@ $cfg->leapovermnetloglevel = 0;
// base URL of avatar server (with the trailing slash)
// This should normally be set to http://www.gravatar.com/avatar/
//$cfg->remoteavatarbaseurl = 'http://www.gravatar.com/avatar/';
// Options for width/height of wysiwyg editor in block configuration
// forms. Workaround for current lack of tinymce fullscreen button.
//
// Make the block config form expand to the full width of browser window
// whenever it contains a tinymce (also increases editor height in
// textbox blocktype):
// $cfg->blockeditormaxwidth = true;
//
// Set a fixed height in pixels for the tinymce editor (currently only
// affects the textbox blocktype):
// $cfg->blockeditorheight = 550;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment