Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
wysiwyg Class Reference

Public Member Functions

 wysiwyg ($name='wysiwyg', $web_path='')
 
 paint ()
 
 process ()
 
 print_config ()
 
 print_plugin_vars ()
 
 print_plugin_shortcuts ()
 
 print_plugin_create_select ()
 
 print_plugin_functions ()
 
 print_plugin_generic_functions ()
 
 print_plugin_button_clicks ()
 
 print_plugin_combo_selected ()
 
 print_plugin_button_type ()
 
 print_plugin_update_toolbar ()
 
 print_plugin_exec_commands ()
 
 print_plugin_pre_get_html ()
 
 print_plugin_get_html ()
 
 print_plugin_form_submit ()
 
 print_plugin_event_handlers ()
 
 add_plugin ($name)
 
 open_group ()
 
 close_group ()
 
 plugin_loaded ($name)
 
get_plugin ($name)
 
 set_body_type ($type='iframe')
 
 set_init_onload ($init=TRUE)
 
 set_show_status_bar ($show=TRUE)
 
 set_width ($width='auto')
 
 set_height ($height='auto')
 
 set_textarea_extras ($extras='')
 
 set_contents ($contents)
 
 set_stylesheet ($stylesheet)
 
 set_dir_attr ($dir_attribute)
 
 add_relative_href_check ($find, $replace)
 
 add_absolute_url_check ($find, $replace)
 

Data Fields

 $name = 'wysiwyg'
 
 $body_type = 'iframe'
 
 $init_onload = TRUE
 
 $show_status_bar = TRUE
 
 $web_path = ''
 
 $stylesheet = ''
 
 $width = 'auto'
 
 $height = 'auto'
 
 $relative_href_checks = Array()
 
 $absolute_url_checks = Array()
 
 $textarea_extras = ''
 
 $contents = ''
 
 $_plugins = Array()
 
 $_loaded_plugins = Array()
 
 $_group_open = FALSE
 
 $init = FALSE
 
 $dir_attribute = ''
 

Detailed Description

Definition at line 32 of file wysiwyg.inc.

Member Function Documentation

add_absolute_url_check (   $find,
  $replace 
)

Add an absolute URL check to the editor

Parameters
string$findthe pattern to match the relative HREF
string$replacethe replacement to make the absolute URL
Returns
void public

Definition at line 2175 of file wysiwyg.inc.

add_plugin (   $name)

Adds a plugin to the plugins array - adding functionality

This must be done BEFORE calling the paint() function. If no toolbar button group is currently open, the buttons for the plugin will be added to a new group, otherwise they will join the currently open one.

Parameters
string$nameThe unique name of this plugin
Returns
boolean public
See Also
open_group(), close_group()

Definition at line 1913 of file wysiwyg.inc.

add_relative_href_check (   $find,
  $replace 
)

Add a relative HREF check to the editor

Parameters
string$findthe pattern to match the absolute URL
string$replacethe replacement to make the relative HREF
Returns
void public

Definition at line 2157 of file wysiwyg.inc.

close_group ( )

Close the currently open grouping on toolbar buttons

Returns
boolean public
See Also
open_group()

Definition at line 1960 of file wysiwyg.inc.

& get_plugin (   $name)

Get a reference to a plugin object

Parameters
string$nameThe unique name of the plugin to get
Returns
mixed object|NULL public

Definition at line 1993 of file wysiwyg.inc.

open_group ( )

Open a new toolbar grouping of buttons

Returns
boolean public
See Also
close_group()

Definition at line 1943 of file wysiwyg.inc.

paint ( )

Paints the JS needed for the WYSIWYG and the editable textarea

Returns
void public

Definition at line 200 of file wysiwyg.inc.

plugin_loaded (   $name)

Checks if a plugin has been loaded into the editor

Parameters
string$nameThe unique name of the plugin
Returns
boolean public
See Also
add_plugin()

Definition at line 1978 of file wysiwyg.inc.

print_config ( )

Prints the config section of the WYSIWYG The config section is where the plugins define where and how they print

Returns
void public

Definition at line 1574 of file wysiwyg.inc.

print_plugin_button_clicks ( )

Prints the JS executed on click for each plugin

Returns
void public

Definition at line 1770 of file wysiwyg.inc.

print_plugin_button_type ( )

Prints the JS to create special types of buttons

Returns
void public

Definition at line 1800 of file wysiwyg.inc.

print_plugin_combo_selected ( )

Prints the JS executed on select for select box plugins

Returns
void public

Definition at line 1785 of file wysiwyg.inc.

print_plugin_create_select ( )

Prints the code to get the options array for select box plugins

Returns
void public

Definition at line 1725 of file wysiwyg.inc.

print_plugin_event_handlers ( )

Prints any JS the plugin wants executed when an event is fired by the WYSIWYG's iframe or div

Returns
void public

Definition at line 1890 of file wysiwyg.inc.

print_plugin_exec_commands ( )

Prints any JS the plugin wants executed before the editable form element has its way

Returns
void public

Definition at line 1830 of file wysiwyg.inc.

print_plugin_form_submit ( )

Prints any JS the plugin wants executed before submitting the form

Returns
void public

Definition at line 1875 of file wysiwyg.inc.

print_plugin_functions ( )

Prints custom JS functions used by the plugins for each editor

Returns
void public

Definition at line 1740 of file wysiwyg.inc.

print_plugin_generic_functions ( )

Prints JS functions used by the plugins that are generic

Returns
void public

Definition at line 1755 of file wysiwyg.inc.

print_plugin_get_html ( )

Prints any JS the plugin wants executed on returned HTML from getHTML

Returns
void public

Definition at line 1860 of file wysiwyg.inc.

print_plugin_pre_get_html ( )

Prints any JS the plugin wants executed on before getHTML gets the contents

Returns
void public

Definition at line 1845 of file wysiwyg.inc.

print_plugin_shortcuts ( )

Prints the keyboard shortcuts defined by each plugin

Returns
void public

Definition at line 1710 of file wysiwyg.inc.

print_plugin_update_toolbar ( )

Prints the JS executed by each plugin when the toolbar is updated

Returns
void public

Definition at line 1815 of file wysiwyg.inc.

print_plugin_vars ( )

Prints the JS variables defined by each plugin

Returns
void public

Definition at line 1695 of file wysiwyg.inc.

process ( )

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

Returns
string public

Definition at line 1546 of file wysiwyg.inc.

set_body_type (   $type = 'iframe')

Sets the body type of the WYSIWYG editor (iframe or div)

Parameters
string$typeThe body type used to print/scale
Returns
void public

Definition at line 2012 of file wysiwyg.inc.

set_contents (   $contents)

Sets the initial contents of the WYSIWYG editor

Parameters
string$contentsSome HTML content
Returns
void public

Definition at line 2105 of file wysiwyg.inc.

set_dir_attr (   $dir_attribute)

Sets the dir attribute for the body in WYSIWYG editor

Parameters
string$dir_attributevalue of dir attribute
Returns
void public

Definition at line 2142 of file wysiwyg.inc.

set_height (   $height = 'auto')

Sets the height of the WYSIWYG editor

Parameters
string$heightThe height of the editor
Returns
void public

Definition at line 2073 of file wysiwyg.inc.

set_init_onload (   $init = TRUE)

Sets weather the WYSIWYG initilises itself onLoad for the window

Parameters
boolean$initInit or not
Returns
void public

Definition at line 2027 of file wysiwyg.inc.

set_show_status_bar (   $show = TRUE)

Sets weather we should show the status bar or not

Parameters
boolean$showShow or not
Returns
void public

Definition at line 2042 of file wysiwyg.inc.

set_stylesheet (   $stylesheet)

Sets the stylesheet for the WYSIWYG editor to use

Parameters
string$stylesheetThe href of the stylesheet
Returns
void public

Definition at line 2127 of file wysiwyg.inc.

set_textarea_extras (   $extras = '')

Sets extra HTML you want in the TEXTAREA tag Usually would be used to set width and height

Parameters
string$extrasThe extra HTML
Returns
void public

Definition at line 2090 of file wysiwyg.inc.

set_width (   $width = 'auto')

Sets the width of the WYSIWYG editor

Parameters
string$widthThe width of the editor
Returns
void public

Definition at line 2057 of file wysiwyg.inc.

wysiwyg (   $name = 'wysiwyg',
  $web_path = '' 
)

Constructor

Parameters
string$nameA unique name for this WYSIWYG

public

Definition at line 184 of file wysiwyg.inc.


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