Parameters editor Name of the editor area/form field.
Returns
A JavaScript string, which must be executed before a form containing the
editor field is submitted. Not all editors will require this.
onSetContent
Description Gets some JavaScript, which can be used to set the contents of the editor.
Parameters
name Name of the editor area/form field.
HTML The new content of the editor.
Returns
A JavaScript string that when executed client-side, will set the contents of
the editor to the value of the HTML parameter.
Editors-xtd
This group is used to extend editor plugins by creating additional buttons for the
editors. Unfortunately, the core 'xstandard' editor does not support these plugins.
There is only one event associated with this group, onCustomEditorButton.
Since there is only one event associated with the group, we tend to use functions
instead of full-blown JPlugin subclasses. This example shows how we can add a
button, which adds the smiley ':)' to the editor content.
// no direct access
defined('_JEXEC') or die('Restricted access');
$mainframe->registerEvent('onCustomEditorButton',
'plgSmileyButton');
/**
* Smiley button
*
* @name string Name of the editor
* @return array Array of three elements: JavaScript action,
Button name, CSS class.
Pages:
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211