Continuing my explorations of JQuery + TurboGears today, I started working on a simple RTE-light wrapper widget. RTE-light is an extremely small, simple analogue to TinyMCE, so I figured it would be easy to set it up with the tw.tinymce project as reference.
There's a paster script to auto-start a widget project, so that went easily. The things I ran into that I'll have to look into updating the docs regarding:
- who should show up as author for a "wrapper" project? Need to add packager stuff at some point.
- there must be a way to say "what URL will this file show up at" within the toscawidgets resource tree, but I didn't find it. I wound up hard-coding the reference (rte-light wants a base URL from which to load its icons).
- I got stuck for quite a while trying to use the default template in the class... of course a rte-light widget needs a TextArea, not a Div, and until I switched to a tw.forms.TextArea as the base class I had no luck with anything.
Given the sheer number of JQuery plugins, I don't think this kind of project is going to be done for all of them. My "abstraction" itch is telling me to write some kind of automated wrapping mechanism or a "hack" way to use X extension without any packaging/wrapping. My "concretism" itch is saying "just wrap the ones people actually want to use, and wrap them properly".
Which reminds me, I have to get that PyCon presentation written up...