|
Re: Customising elements that are created from the toolbar: msg#00045web.kupu.devel
Nicholas Hemley wrote: > basically, I would like to customise, for example, the lists so that > when a list is created it is created with class info such as <ul><li > class='content'></ul> etc. > > Obviously, i cannot just override the style for <li> in a skin since i > need the editor to add the class info (this is picked up later on in a > live site exported from Plone) Unfortunately the tool used to create lists currently just sets the style attribute rather than setting a classname. > Any info would be appreciated. I guess the question is how I customise > elements that are created from the toolbar... The available liststyles are defined in toolbar.kupu. What I would do if I were going to make these customisable would be first to add appropriate configuration sections to the kupu tool, and then override the kupu:part for liststyles in plone's toolbar.kupu so that it generates the list from the configured options. Then I would extend ListTool in kupubasetools.js. Currently setListStyle sets the style.listStyleType attribute to the value from the pulldown; I would change this to split the pulldown value in two parts on '|' where the first part is what is currently used, and the second part is a className. Then all you have to do is set the className attribute if one is specified, or delete the className attribute if there isn't one. This is what we do for the paragraph styles. The configuration there uses three parts: title|tag|class, so for pulldown lists I would make the configuration: title|listStyleType|class. kupuploneui.js contains the code which sets paragraph styles with classes. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: macro nesting limit: 00045, Alexander Limi |
|---|---|
| Next by Date: | [slightly off-topic] Sponsoring kupu features...: 00045, sean . upton |
| Previous by Thread: | Customising elements that are created from the toolbari: 00045, Nicholas Hemley |
| Next by Thread: | macro nesting limit: 00045, Michael Zimmermann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |