Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change notification.
The following page has been changed by JörnNettingsmeier: http://wiki.apache.org/lenya/GenericEditorAPI ------------------------------------------------------------------------------ Requirements: - * the implementation must be completely editor-agnostic + * the implementation must be completely editor-agnostic - * some editors have very good link/image editing facilities (to set title, class, target, size etc.), others are very rustic. the generic usecases should be able to provide all those features, but they must be switchable in case an editor wants to use its own facilities. + * some editors have very good link/image editing facilities (to set title, class, target, size etc.), others are very rustic. the generic usecases should be able to provide all those features, but they must be switchable in case an editor wants to use its own facilities. - * the API must be really slick :) + * the API must be really slick :) Idea: provide the new usecase window with a linkData/imageData object containing default settings (see below), and only display form fields for those attributes that are (!undefined) in linkData/imageData. + Problem: passing data by creating an attribute in the new window object does not work reliably in Firefox if the window already exists: + {{{ + var foo = window.open("someurl","WindowName", "someoption=no..."); + foo.lenyaLinkData = {....}; + }}} + + It seems like the window nukes the field again after it has been set :( resetting at a later time works, though. not nice. + + Solution: provide a callback that the child window can call.... let's see how it works out. + Each editor module can access and use the generic insertImage and insertLink implementations in the editors module. The most common way to do that is to use a javascript window.open call to create a separate window for the usecase: {{{ <img src="linkbutton.gif" onclick="window.open('?lenya.usecase=editors.insertLink&lenya.editorModule=$YOUREDITOR')" /><br /> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
