EDITOR PROPERTIES AND METHODS
BUE:
the top most container variable having other variables and methods in it.
BUE.mode:
Integer representing the selection handling mode. 0- None, 1- Gecko and Webkit, 2- IE, 3- Opera
BUE.templates:
container for editor templates(configurations, buttons and interface)
BUE.instances:
array containing the editor instances in the page
BUE.active:
currently active or last used editor instance. When a button is clicked or a textarea is focused,
the corresponding editor instance becomes the BUE.active. If there are multiple editor instances, accesskeys
are switched to work on the BUE.active.
BUE.active is widely used in javascript buttons since the methods of the current editor instance are accessed
using it. Each editor instance has its own variables and methods that can(should) be used by javascript buttons.
See EDITOR INSTANCE
BUE.processTextarea(T, tplid):
integrates the editor template(BUE.templates[tplid]) into the textarea T.
This can be used for dynamic editor integration at any time after page load.
BUE.postprocess:
a list(object) of post process functions which are called with the parameters E(editor instance) and $(jQuery) just after instance creation.
BUE.postprocess.yourProcessName = function(E, $){/* Extend/alter the instance E */};
BUE.buttonClick(eindex, bindex):
Trigger click event of the button BUE.instances[eindex].buttons[bindex]
BUE.text(text):
Process text for standardizing the new line characters.
Introduced by bue.popup library:
BUE.dialog:
dialog object of the editor used like a pop-up window for getting user input or displaying data.
BUE.dialog.open(title, content, effect):
Opens the dialog with the given title and content in it.
optional effect parameter is one of the jQuery effects ('slideDown' or 'fadeIn')
see also the openPopup() method below.
BUE.dialog.close(effect):
Closes the dialog.
BUE.quickPop:
another dialog object of the editor. It has no title or close button.
It has its own variables and methods.
BUE.quickPop.open(content, effect):
Opens the quick-pop with the content in it.
BUE.openPopup(id, title, content, effect):
Opens a pop-up having the given "id", titled as "title" and containing the "content".
Returns the js object representing the pop-up(a html table object).
This pop-up object has its internal "open(title, content, effect)" and "close(effect)" methods which can be used for
further opening and closing operations.
Since pop-up object is a html table object, it has all the methods and properties of a regular table.
The difference between a pop-up and editor.dialog is that editor.dialog can only have one instance visible at a time, and it doesn't allow textarea editing when it is open.
Optional effect parameter is one of the jQuery effects (opening: 'slideDown', 'fadeIn', closing: 'slideUp', 'fadeOut')
or it can be a set of options:
{
effect: jQuery effect (default: 'show'),
speed: either milliseconds or one of the 'slow', 'normal', 'fast' (default: 'normal'),
offset: position of the popup(default: {top: top offset of the active button, left: left offset of the active button}),
onopen(or callback): function to be run after opening (default: internal function to focus on the popup),
onclose: function to be after closing the popup(default: none)
}
BUE.createPopup(id, title, content):
This method is used by openPopup method. Creates and returns the pop-up object for further use.(does not open it)
See the next page for EDITOR INSTANCE object that is a must-read in order to create javascript buttons.
Editorial corrections:
Editorial corrections: (errors are highlighted)
currently active or last used editor istance. When a button is clicked or a textarea is focused,
the corresponding editor instance becomes the editor.active. If there are multiple editor instances, accesskeys