Abstract Class midcom_helper_datamanager_widget_tinymce

Description

This is a WYSIWYG HTML widget that uses the powerful TinyMCE editor

This widget should only be used with the text type configured to an unlimited-length field.

Configuration parameters:

widget_tinymcearea_customconfig: This widget has smart defaults that are inspired by popular text processors. You can adjust its look and functionality here (e.g. to enhance or strip down functions). See http://tinymce.moxiecode.com/docs/using.htm how to do this. Important: leave the "mode" setting ("specific_textareas") alone or this thing will begin to do very strange things

Sample configuration

 "html" => array (
     "description" => "WYSIWYG HTML",
     "datatype" => "text",
     "location" => "attachment",
     "widget" => "tinymce",
     "widget_tinymce_customconfig" => <<

Note

As an advantage over HTMLarea we are now able to use more than one WYSIWYG editor field per page. But we still can use only one configuration set. So all TinyMCE editors in one page will look the same, only the first configuration is taken into account.

TinyMCE Copyright (c) 2004, Moxiecode Systems AB, All rights reserved

  • abstract: WYSIWYG HTML Widget (TinyMCE)
  • todo: Documentation and links how to configure TinyMCE

Located in /midcom.helper.datamanager/widget_tinymce.php (line 63)

midcom_helper_datamanager_widget
   |
   --midcom_helper_datamanager_widget_tinymce
Variable Summary
Method Summary
 void draw_view ()
 void draw_widget ()
 void _constructor (mixed &$datamanager, mixed $field, mixed $defaultvalue)
 string _get_config_js ()
Variables
Methods
draw_view (line 118)
void draw_view ()

Redefinition of:
midcom_helper_datamanager_widget::draw_view()
Wenn called, this method should display the current data without any editing widget.
draw_widget (line 123)
void draw_widget ()

Redefinition of:
midcom_helper_datamanager_widget::draw_widget()
This method draws the HTML-Form widgets required to edit the data. This can be anything from a single form tag to a full list of them. Note, that you will be automatically enclosed within the calls to draw_widget_start and draw_widget_end.
_constructor (line 78)

The constructor will add the corresponding Javascript code only if we are running AIS. On-Site usage is not yet possible.

void _constructor (mixed &$datamanager, mixed $field, mixed $defaultvalue)

Redefinition of:
midcom_helper_datamanager_widget::_constructor()
The constructor populates the internal members with a reference to the datamanger we belong to, the definition of the field we use and the default value we should use to initialize the widget's data.
_get_config_js (line 145)

Get the TinyMCE configuration This will be included in the "tinyMCE.init(...)" call

  • /$GLOBALS['midcom_config']['midcom_sgconfig_basedir']/midcom.helper.datamanager.widget_tinymce/config
  • file:/midcom/helper/datamanager/config/midcom.helper.datamanger.widget_tinymce
  • local fallback default configuration
Look at the source of this function how your template should look like.

TODO: this does not work yet!

  • return: JS configuration code
string _get_config_js ()

Inherited Methods

Inherited From midcom_helper_datamanager_widget

 midcom_helper_datamanager_widget::midcom_helper_datamanager_widget()
 midcom_helper_datamanager_widget::draw_helptext()
 midcom_helper_datamanager_widget::draw_view()
 midcom_helper_datamanager_widget::draw_widget()
 midcom_helper_datamanager_widget::draw_widget_end()
 midcom_helper_datamanager_widget::draw_widget_start()
 midcom_helper_datamanager_widget::get_css_classes_required()
 midcom_helper_datamanager_widget::get_value()
 midcom_helper_datamanager_widget::set_value()
 midcom_helper_datamanager_widget::_constructor()
 midcom_helper_datamanager_widget::_read_formdata()

Documentation generated on Tue, 15 Aug 2006 13:10:04 +0300 by phpDocumentor 1.3.0RC3