As with all subclasses, the actual initialization is done in the initialize() function, not in the constructor, to allow for error handling.
This widget supports all types which have a simple, plain text representation accessible though their value member. The class will put HTML into those base types.
This type extends the regular textarea type, as this is the fallback for all cases where TinyMCE doesn't run (on Opera f.x.).
Available configuration options:
boolean use_imagepopup Defaults to yes. Use the imagepopup it the element is attached to an object.
string imagepopup_object If you want to override the normal object (f.x. to have a central attachments object). Set that object's guid here. NOTE: NOT IMPLEMENTED YET. MAY CHANGE!
Notes about TinyMCE configuration:
TinyMCE uses a JScript array, outlined in http://tinymce.moxiecode.com/tinymce/docs/reference_configuration.html to configure itself. A different configuration can be used for each textarea, as all of them are initialized individually. If the specified snippet is not used, some default configuration is used (see the private function _get_advanced_configuration).
Configuration is specified in an already JScript compatible way: The main config snippet is included verbatim, as is the information in the local_config option.
The following options must not be specified in any configuration: mode, elements, language
Be aware that this must be valid javascript code to be inserted into the Init function. Especially ensure that all lines end with a comma or the merging with the element-specific startup code will fail. This is important for both the config-snippet and the local config!
Example:
If you add this as the configuration snippet:
theme : "advanced", cleanup: false,
... we will get this startup code:
tinyMCE.init({ theme : "advanced", cleanup: false, mode: "textarea", ... });
In case you have anything in local config, it will be added below the configuration snippet and above the element specific startup code. (Which is important if you specify the same key twice.)
package | midcom.helper.datamanager2 |
---|
string
empty or containing ",imagepopup"The systemwide defaults for the theme and the mce config snippet will be loaded from the config file at this point.
todo | make overrideable. |
---|
boolean
always trueNote, that this is a copy of the base class function, as we need another CSS rule here besides the additional initialization code.
A static flag prevents multiple insertions of these dependencies.
string
theme : "advanced", button_title_map : false, apply_source_formatting : true, plugins : "table,contextmenu,paste,fullscreen", theme_advanced_buttons2_add : "separator,fullscreen,selectall,pastetext,pasteword,", theme_advanced_buttons3_add : "separator,tablecontrols", paste_create_linebreaks : false,
string
The default configurationArgument must be applicable to use with midcom_helper_misc::get_snippet_content.
valid values: simple, advanced or tiny