void oBXEditorUtils.setCustomNodeParams( object pNode array arParams );
The oBXEditorUtils.setCustomNodeParams method sets the custom element parameters passed in the array. Used when 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.
Parameter | Description |
---|---|
pNode | A DOM node of the document structure or a BXNodeElement object that is passed to UnParseElement() when defining the class of the user taskbar. (See also Adding custom taskbars). |
arParams | Property array. Both associated and nested arrays are possible. |
oBXEditorUtils.getCustomNodeParams()
<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); _arParams['value'] = 'new value'; //... //Sets the property array oBXEditorUtils.setCustomNodeParams(_pElement,_arParams); //... } CustomTaskbar.prototype.UnParseElement = function(node) { //... //Returns an array of properties var arParams = oBXEditorUtils.getCustomNodeParams(node); //... arParams['property'] = 'new property'; //... //Sets a property array oBXEditorUtils.setCustomNodeParams(node,arParams); //... return false; } } </script>
© 2001-2007 Bitrix | Bitrix Site Manager |