Commit e86b730c authored by Nigel McNie's avatar Nigel McNie
Browse files

Textbox blocktype now uses configdata for its content. Still needs a lot of work.

parent 16569800
...@@ -41,7 +41,27 @@ class PluginBlocktypeTextbox extends PluginBlocktype { ...@@ -41,7 +41,27 @@ class PluginBlocktypeTextbox extends PluginBlocktype {
} }
public static function render_instance(BlockInstance $instance) { public static function render_instance(BlockInstance $instance) {
return 'hell0r'; $configdata = $instance->get('configdata');
// TODO if wysiwyg off, then format_whitespace, else cleaning needs to be done
return (isset($configdata['text'])) ? format_whitespace($configdata['text']) : '';
}
public static function has_instance_config() {
return true;
}
public static function instance_config_form($instance) {
log_debug('getting instance config form for ' . $instance->get('id'));
$configdata = $instance->get('configdata');
return array(
'text' => array(
'type' => 'wysiwyg',
'title' => 'Text',
'width' => '100%',
'height' => '50px',
'defaultvalue' => $configdata['text'],
),
);
} }
} }
......
Supports Markdown
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