Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
wysiwyg_plugin Class Reference
Inheritance diagram for wysiwyg_plugin:
about definition_list format_font general history indenting insert_image insert_link listing matrix_accessibility matrix_embed_movie matrix_embed_youtube matrix_expand_keywords matrix_insert_anchor matrix_insert_image misc_accessibility s_script special_chars spell_checker text_indicator

Public Member Functions

 WYSIWYG_Plugin (&$wysiwyg)
 
 _add_button ($id, $cmd, $tooltip, $textmode, $position, $context='')
 
 _open_menu ($id, $tooltip, $textmode, $position, $context='')
 
 _close_menu ($id)
 
 print_plugin_vars ()
 
 print_plugin_shortcuts ()
 
 print_plugin_create_select ()
 
 paint ()
 
 process (&$html)
 
 set_contents (&$contents)
 
 paint_generic ()
 
 print_plugin_button_click ()
 
 print_plugin_combo_selected ()
 
 print_plugin_exec_command ()
 
 print_plugin_update_toolbar ()
 
 print_plugin_button_type ()
 
 print_plugin_get_html ()
 
 print_plugin_pre_get_html ()
 
 print_plugin_form_submit ()
 
 print_plugin_event_handler ()
 
 get_popup_href ($filename, $classname='')
 

Static Public Member Functions

static check_usable ()
 

Data Fields

 $buttons = Array()
 
 $_show_in_toolbar = TRUE
 
 $wysiwyg = NULL
 

Detailed Description

Definition at line 31 of file wysiwyg_plugin.inc.

Member Function Documentation

_add_button (   $id,
  $cmd,
  $tooltip,
  $textmode,
  $position,
  $context = '' 
)

Adds a printable toolbar button to this plugin

Parameters
string$idA unique ID for this button
string$cmdThe command to run when the button is clicked This command will be used to switch on action of a pressed button to determine the functionality
string$tooltipThe tooltip for this button (appears on hover)
string$textmodeShould this button be available in text mode? Value is either 'true' or 'false' (with quotes)
string$positionThe position of the button in the toolbar image This is zero indexed (first button is id zero)
string$contextEnable this button if outside this element
Returns
void private

Definition at line 91 of file wysiwyg_plugin.inc.

_close_menu (   $id)

Closes an open menu of grouped buttons

Parameters
string$idA unique ID of the menu
Returns
void private

Definition at line 136 of file wysiwyg_plugin.inc.

_open_menu (   $id,
  $tooltip,
  $textmode,
  $position,
  $context = '' 
)

Opens a drop down menu to group buttons

Parameters
string$idA unique ID for this menu
string$tooltipThe tooltip for the menu button (appears on hover)
string$textmodeShould this menu be available in text mode? Value is either 'true' or 'false' (with quotes)
string$positionThe position of the menu button in the toolbar image This is zero indexed (first button is id zero)
string$contextEnable this menu if outside this element
Returns
void private

Definition at line 116 of file wysiwyg_plugin.inc.

static check_usable ( )
static

Check whether this plugin is ready to be used.

Return a TRUE if ok or a error message.

Returns
mixed boolean|string public

Definition at line 401 of file wysiwyg_plugin.inc.

get_popup_href (   $filename,
  $classname = '' 
)

Returns a path to a file in this plugin's directory This value can be passed to the _popupDialog function of the WYSIWYG object

Parameters
$filename
$classname
Returns
string public

Definition at line 384 of file wysiwyg_plugin.inc.

paint ( )

Paints any JS functions needed by this plugin on a per WYSIWYG basis This code is printed outside of script tags - print script tags yourself

Returns
void public

Definition at line 192 of file wysiwyg_plugin.inc.

paint_generic ( )

Paints any JS generic functions needed by this plugin These functions can be used by all WYSIWYGs on the page This code is printed outside of script tags - print script tags yourself

Returns
void public

Definition at line 238 of file wysiwyg_plugin.inc.

print_plugin_button_click ( )

Prints JS executed when a button of this plugin is clicked This code is a case statement - do not use script tags

Returns
void public

Definition at line 252 of file wysiwyg_plugin.inc.

print_plugin_button_type ( )

Prints JS to create special types of buttons for this plugin This code is a case statement - do not use script tags

Returns
void public

Definition at line 308 of file wysiwyg_plugin.inc.

print_plugin_combo_selected ( )

Prints the JS executed on select for any select boxes in this plugin This code is a case statement - do not use script tags

Returns
void public

Definition at line 266 of file wysiwyg_plugin.inc.

print_plugin_create_select ( )

Prints any JS code needed to get the options array for any select boxes in this plugin This code is a case statement - do not use script tags

Returns
void public

Definition at line 178 of file wysiwyg_plugin.inc.

print_plugin_event_handler ( )

Prints an JS the plugin wants executed when an event is fired in the wysiwyg's iframe or div This code is in a function - do not use script tags You can reference the variables 'editor' and 'ev' ( = the event fired) from within this code

Returns
void public

Definition at line 366 of file wysiwyg_plugin.inc.

print_plugin_exec_command ( )

Prints any JS the plugin wants executed before the WYSIWYG has its way This code is a case statement - do not use script tags

Returns
void public

Definition at line 280 of file wysiwyg_plugin.inc.

print_plugin_form_submit ( )

Prints any JS the plugin wants executed before submitting the form This code is a function - do not use script tags

Returns
void public

Definition at line 350 of file wysiwyg_plugin.inc.

print_plugin_get_html ( )

Prints any JS the plugin wants executed on returned HTML from getHTML This code is a function - do not use script tags

Returns
void public

Definition at line 322 of file wysiwyg_plugin.inc.

print_plugin_pre_get_html ( )

Prints any JS the plugin wants executed before getHTML runs This code is a function - do not use script tags

Returns
void public

Definition at line 336 of file wysiwyg_plugin.inc.

print_plugin_shortcuts ( )

Prints shortcut keys for the buttons of this plugin This code is a case statement - do not use script tags

Returns
void public

Definition at line 164 of file wysiwyg_plugin.inc.

print_plugin_update_toolbar ( )

Prints the JS executed by buttons of this plugin when the toolbar is updated This code is a case statement - do not use script tags

Returns
void public

Definition at line 294 of file wysiwyg_plugin.inc.

print_plugin_vars ( )

Prints any JS variable needed by the WYSIWYG editor This code is output in the HTMLArea construtor - do not use script tags

Returns
void public

Definition at line 150 of file wysiwyg_plugin.inc.

process ( $html)

Processes and returns the submitted HTML from the editor This allows plugins to modify the html as they see fit.

Parameters
string&$htmlthe HTML that was submitted by the editor
Returns
string public

Definition at line 208 of file wysiwyg_plugin.inc.

set_contents ( $contents)

Sets the initial contents of the WYSIWYG editor

Parameters
string&$contentsSome HTML content
Returns
void public

Definition at line 223 of file wysiwyg_plugin.inc.

WYSIWYG_Plugin ( $wysiwyg)

Constructor

Parameters
objectwysiwyg $wysiwyg A reference to the WYSIWYG that this plugin is being created for
Returns
object WYSIWYG_Plugin public

Definition at line 67 of file wysiwyg_plugin.inc.


The documentation for this class was generated from the following file: