Edit-In-Place Enhancements
Enhanced EIP
Our EIP feature was designed to make it easy to perform small edits on already-published modules. For those who've used it, it works well. Even non-technical authors who would balk at a textarea full of XML are comfortable making small changes at the paragraph level. There have been two common requests for EIP since we introduced it:
- The ability to add new paragraphs.
- The ability to perform EIP in a workspace.
This document describes the design of an enhanced EIP to meet these
and other goals.
Adding elements
- At valid points in the document users will be presented with a form for adding a new block element. This will consist of a dropdown menu and an Add button (or alternatively an Add... link with a pop-up drop-down).
- In addition to the list of elements that can be added, the dropdown will have an Other... entry which will popup a window explaining how to add other elements.
- Depending on the element selected for adding, the Add form will
either become the usual EIP textarea for editing XML or a customized
form for editing a particular element. For example, the figure element
may have a custom form for selecting media objects from the files
present in the module.
- Until the user clicks Preview/Save, the addition of the new tag may be canceled by clicking the Cancel button.
Editing Elements
Editing elements in the new EIP will work mostly like it did in the existing implementation:
- Editable elements are displayed with a white background and a black border
- When the user clicks on an editable element, the element will be replaced with the EIP editing area consisting of a textarea containing the XML source for that element, followed by buttons for Preview, Cancel, Delete (if editing a published module) or Save, Cancel, Delete (if editing a module in a workspace)
- While the EIP editing area is displayed, the user cannot click on another element to edit it.
- When the user clicks Cancel, the element will return to its state before the user clicked to edit. Note that for published module, the element reverts to the state after the last Preview.
- When the user clicks Preview/Save, the XML content of the editing area is sent to the server for validation. Any validity errors will be shown to the user in a popup window.
The following features are new to the enhanced EIP:
- More elements are now considered editable including figure, exercise, note, code
- Named entities may be expanded to either the UTF-8 equivalent character or the numerical entity equivalent so the document may be validated using a non-DTD schema technology.
- Duplicate namespaces on child elements will be removed.
- Additional namespaces added to child tags will be moved into the root tag, changing the DOCTYPE if necessary. This allows users to add MathML (or QML, etc.) to a document that did not previously declare it.
Deleting elements
- Any element that may be deleted without causing the module to become invalid will have a Delete button that appears next to Cancel while editing.
- Deletion must be confirmed via a javascript prompt.
EIP in the Workspace
Being part of the
author editing environment puts new requirements on EIP[1]
- There will be a new Edit tab serving as the default editing view for modules. This page will have the Connexions authoring look and feel (portlets, tabs, etc.) with the EIP look and functionality inside. There will be no EIP Publish/Cancel form at the top of the page since that functionality is already available through other means in the workspace.
- When creating a new module, after entering metadata (title, keywords, etc.), the user should be taken to the Edit tab.
- When editing an element, a Save button will take the place of the Preview button.
- Clicking the Save button makes changes immediately to the module in the workspace.
Full-Source Editing mode
- Users must be able to switch to and from a full-source editing mode that consists of a textarea containing the module's text for editing and a Save button.
- If the user manually switches to full-source mode and then clicks the Save'button the module text, the page should return the user to
still in full-source mode (but later visits to the page will default to EIP mode).
- If the user's browser does not support javascript (or a sufficiently advanced javascript) the Edit tab will instead present the user with full-source mode along with a warning message about why EIP is not supported.
- If the XML content of a module is in an invalid state the user will be presented with full-source mode. Once the validity errors are fixed, the user will be taken to EIP mode.
[1] Actually, continuing to call it Edit-In-Place is now something of a
misnomer since the original meaning of "in place" refered to the fact that modules could be edited directly from their published location and did not have to be checked out in a workspace. We'll now reinterpret EIP to mean the editing of a single part (paragraph, list, etc.) of a document "in place".
