ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Client side

Obout.Ajax.UI.HTMLEditor.ToolbarButton.MethodButton class

 Inheritance Hierarchy

It is a client-side representation of the server-side Obout.Ajax.UI.HTMLEditor.ToolbarButton.MethodButton class.

Base class for all image method buttons in Obout.Ajax.UI.HTMLEditor.ToolbarButton namespace that are shown in design mode .

Note Note
To get property values for client API properties, you must call property accessor method that is named with the get_ prefix. For example, to get a value for a property such as id, you call the get_id method:
var _id = buttonObject.get_id();


Name Description
propertyactiveModes ActiveModeType array. Gets an array of edit modes when this button is visible. (Inherited from CommonButton.)
Always returns an array with one item Obout.Ajax.UI.HTMLEditor.ActiveModeType.Design.
propertybuttonName string. Gets the name of the button. (Inherited from CommonButton.)
propertydesignPanel object. Gets the DesignPanel object currently associated with the button. (Inherited from DesignModeImageButton.)
propertyeditPanel object. Gets the EditPanel object currently associated with the button. (Inherited from CommonButton.)
propertyelement string. Gets the DOM element that the current Control instance is associated with. (Inherited from Sys.UI.Control.)
propertyid string. Gets the identifier for the current Control object. The default is the id value of the associated Sys.UI.DomElement object. (Inherited from Sys.UI.Control.)
propertypreservePlace boolean. Gets a value indicating whether to preserve buttons' space when it is invisible. (Inherited from CommonButton.)
Default false.
propertytoolTip string. Gets the tooltip of the button. (Inherited from CommonButton.)


Name Description
propertycallMethod() This method is called on the button clicked.
This method can be overridden in the derived class for the custom button. See online example. (Inherited from DesignModeImageButton.)

Returns true if this method has been executed successfully, otherwise false.

Don't call this method directly.
propertycanBeShown() Returns true if this button can be shown at this moment, otherwise false. (Inherited from CommonButton.)
propertyhideButton() Makes the button invisible. (Inherited from CommonButton.)
propertyisDisplayed() Returns true if this button is visible now, otherwise false. (Inherited from CommonButton.)
propertyisImage() Returns true if this button is an 'image' button, otherwise false. (Inherited from CommonButton.)
Always returns true here.
propertyshowButton() Makes the button visible. (Inherited from CommonButton.)

Example of JavaScript file for the custom method button


CustomToolbarButton.InsertDate = function(element) {
  CustomToolbarButton.InsertDate.initializeBase(this, [element]);
CustomToolbarButton.InsertDate.prototype = {
  callMethod: function() {
     if (!CustomToolbarButton.InsertDate.callBaseMethod(this, "callMethod")) {
        return false;
     var editor = this.get_designPanel();
     var editPanel = this.get_editPanel();

     try {
        // For 'Undo'
        // What to do - insert date at current selection
        editor.insertHTML((new Date()).toLocaleDateString());
        // Notify Editor about content changed
        // and update toolbars linked to the edit panel

        setTimeout(function() {
        }, 0);
        // Ensure focus in design panel
        return true;
     } catch (e) {}

"I have read great things about your support, but you guys really are exceptional. "

Richard Mikesell

Random testimonial   All testimonials