Hi Jörn, Jörn Nettingsmeier schrieb:
> i'm just playing around with a batch of Grand Unified Editor Usecases... > as mentioned before, my goal is to have generic editor helper usecases > in the editors module, which can then be used by all editors. > i've done a prototype implementation of insertLink, using most of the > old code from bxe, and richard iirc has done almost generic versions of > insertAsset and insertImage. > > i'd like to tweak those a little... > > currently, they provide a generic java class and jxtemplate, but each > editor that wants to use it must still declare their own "instances" of > those usecases, and pass an editor and callback parameter so that the > correct callback code can be included. > my experimental insertLink (check it out with tinymce!) works a little > bit different: it's a usecase of the editors module, i.e. declared only > once, and then everybody can use it without having to add extra > patchfiles and maintain extra usecase permissions. > plus it does away with the need for a callback and editor parameter, by > assuming that it will always be invoked by its parent via a > window.open(), which means it can access the correct callback by calling > window.opener.Callback(). of course this implies that editors must > implement that callback. check out > http://wiki.apache.org/lenya/GenericEditorAPI for a work-in-progress api > draft. that looks great (I didn't find the time to examine it in detail, though). Thanks a lot for your work! > question is: do you think it makes sense to convert the existing code to > this model and then migrate all editors over? Is it necessary to get the RC out? Or could we postpone it? > the next question is about the "insertAsset" usecase. since we have > buried the concept of assets, can't we just deal with assets via setting > a link? Yes - actually it is a simple link now (in the XHTML resource type): <a href="lenya-document:..." class="asset">...</a> IMO it would be nice if the asset could still be uploaded on the "insert asset" screen. But I'd rather abandon this functionality if it helps to simplify the architecture. A link to open a new browser window to upload an asset might be sufficient. > or is anyone absolutely depending on the size information the > old insertAsset used to provide (which, as andreas pointed out, does not > work reliably and is conceptually wrong)? It's not supported anymore. The "resource" resource type supports a "downloadLink" format now which generates an XHTML snippet containing the actual size information. -- Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
