Bitrix Site Manager

oBXEditorUtils.getCustomNodeParams

array
oBXEditorUtils.getCustomNodeParams(
 object pNode
);

The oBXEditorUtils.getCustomNodeParams method returns parameters of a custom element as an array. Used for processing element properties when defining a custom taskbar (see also Adding custom taskbars).

In WYSIWYG mode, code fragments or other elements can be substituted with their visual representation, for example icons. Properties of these elements are stored in the serialized form as an attribute of this element. This method deserializes properties and returns them in the array.

Parameters:

Parameter Description
pNode A DOM node of the document structure or a BXNodeElement object that is passed to the UnParseElement() method when describing the class of the user taskbar. (See also Adding custom taskbars).

Return Values

Returns an array. The array structure and type (associated or simple) depend on properties assigned to the element when creating or editing it.

Example


<script>

function CustomTaskbar()
{
    var oTaskbar = this;

    CustomTaskbar.prototype.OnTaskbarCreate = function ()
    {
        // ...
    }

    CustomTaskbar.prototype.ShowProperties = function(_bNew, _pTaskbar, _pElement)
    {
        // ...
        // Returns an array of properties
        var arParams = oBXEditorUtils.getCustomNodeParams(_pElement);
        // ...
    }

    CustomTaskbar.prototype.UnParseElement = function(node)
    {
        // ...
        // Returns an array of properties
        var arParams = oBXEditorUtils.getCustomNodeParams(node);
        // ...
        return false;
    }
}

</script>

See also

oBXEditorUtils.setCustomNodeParams().