Hi,\nI need to be able to use several mxDefaultToolbars (via mxDefaultToolbarCodec, that is to have defined them in the config xml), could you tell me how that can be accomplished ?\nI think it would have something to do with the <ui> section, but I do not know how to do it.\nThanks. |
There is no direct support for multiple toolbars in the default setup, but here is what you can do to support any number of toolbars and configure them via the config file. \nStep 1 is to create a toolbar for a specific element in the page, say you have a DIV with an ID of toolbar2, then the code for this is as follows: \n \nNext step is to make this new toolbar accessible via a field in the editor, so that the I/O system can pick it up and configure it. This is done as follows: \n \nIn the above code the new toolbar would be stored under toolbar2 in the editor instance. Note that this must be done before the editor is cofigured using mxEditor.configure. Now you can refer to the toolbar and configure it in the config file as follows: \n \nThe difference is that you cannot use the UI section to associate the additional toolbar with the element in the page. This is done programmatically as shown above. Yes, that's exactly what I ended up doing.Mercifully, the programatic toolbar is static. The gain on the codec side (ie xml) is that you can swap them before runtime or change them on the fly due to the structured content of the xml.\nThanks.
(23 Aug '11, 06:25)
Shockedder
|