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/EditorRoadmap The comment on the change is: moved API stuff to extra page ------------------------------------------------------------------------------ * b) Deliver XHTML with link to CSS * Provide sitetree XML + === Generic Editor API === - === Contract between generic editor usecases (editors.insertImage, editors.insertLink) and editor-specific modules === + GenericEditorAPI - Each editor module can access and use the generic insertImage and insertLink implementations in the editors module: - {{{ - <!-- This is an editor button --> - <a href="?lenya.usecase=editors.insertImage&lenya.editorModule=youreditor">Insert Image</a><br /> - <a href="?lenya.usecase=editors.insertLink&lenya.editorModule=youreditor">Insert Link</a><br /> - }}} - The "lenya.editorModule" request parameter is necessary so that the correct javascript callback functions can be included by the generic usecase view: - {{{ - <script type="text/javascript" src="/modules/{$editorModule}/javascript/editorCallbacks.js"> </script> - }}} - - each editor module that wishes to use the generic usecase implementations '''must''' provide the following callbacks in a file named {{{resources/javascript/editorCallbacks.js}}}: - {{{ - function LenyaInsertImage(imageData) {}; - where - imageData = { - 'src': "/some/path/to/an/image.jpeg", - 'alt': "This is a proper alt description.", - 'title': "The title of the image", - 'width': "150", /* in pixels */ - 'height': "233" /* in pixels */ - }; - }}} - - {{{ - function LenyaInsertLink(linkData) {}; - where - linkData = { - 'href': "/some/path/to/a/document.html", - 'text': "Click here to see the wonders of the world!", - 'title': "This is what pops up if you hover over the <a/>.", - 'name': "someFragmentIdentifier", - 'lang': "en" - }; - }}} - - These functions need to take care of passing the data back to the editor. - In the generic javascript, each global object or function bears the "Lenya" prefix to avoid naming clashes with editor-specific code. - - The passing of objects instead of parameter lists allows for easy extension if necessary. - - - === Contract between validation on the server and editor modules === - - Aach editor should be able to handle validation errors from the server gracefully. It must receive the appropriate error messages from the server, display them to the user, and keep the file checked out! - - This implies that the transmission of the document data and the receiving of result messages should happen via AJAX. - thus it's a task for well after 2.0 is out. - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
