On Fri, Oct 24, 2008 at 4:16 AM, Guillaume Lerouge <guillaume(a)xwiki.com>wrote;wrote:
In the current implementation of the WYSIWYG editor,
when adding content,
pressing the return key creates a new paragraph (<p></p>) and pressing
shift-return creates a new line (<br>).
How would [[return]] affect being in the <UL> or <OL> or <DL>
environments?
Seems like those should have newline behavior that enters a new
list-element, e.g. "<LI>" or <DD> etc.
IMHO, this context-dependent [[return]] behavior is often why I've found it
useful to have some kind of indication of the "structure" or environment one
is currently in, and a dynamic menu of the possible "special subnodes" that
might be available in a given context. In a paragraph context, a dynamic
choice for <BR> vs <P> might be made more apparent in a "special
area" of
the display, in order to be more apparent to the user.
For example,
http://nielsmayer.com/wwweasel/node27.html implements these:
Navigation through the document is made easier by the
use of emacs key
bindings and Motif/Mac-like key bindings. Keyboard commands for moving up
and down lines will move between different markup elements including ``in
line'' images, horizontal separators, and anchors. Context sensitive
insertion of spaces and carriage returns ensure that only legal HTML is
generated. For example, spaces are not significant in HTML documents except
within preformatted (<PRE>) elements, so extra spaces (which would not be
visible in a WWW browser) are caught and the user is advised that the spaces
will not be entered in the document.
One important feature of WYSIWYG view is the automatic generation of the
appropriate separator markups upon hitting the <return> key: for example,
if in a list (ordered, unordered, menu, etc) environment, it makes sense
that hitting return will start the next list item (especially since extra
whitespace typed into WWWeasel's WYSIWYG view are ignored). If in a
definition list, then <return> will cause toggling between entering the
definition-term or the definition-definition. Finally if in a ``generic''
environment not covered by definition lists or list environments then
<return> will start a new paragraph.
I also have found it extremely useful to be able to display both structure
and WYSIWYG information at the same time, e.g.
http://nielsmayer.com/wwweasel/node26.html ... This is especially true for
selection as it is easier to control the extent of something selected for
cut/paste; for example, if one can see the cut/paste animating over the
"structure" being selected (WWWeasel v2, unpublished, I have the
Winterp-Lisp-code for it since I wrote it...).
Additionally, providing "UI-hysteresis" to make selection or cut/paste
&&
drag/drop targets sticky-to-markup-structure is a helpful UI-aide for the
user.
--
Niels
http://nielsmayer.com