hi everyone!
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.
question is: do you think it makes sense to convert the existing code to
this model and then migrate all editors over?
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? 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)?
regards,
jörn
--
Jörn Nettingsmeier
Kurt is up in heaven now.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]