Sergiu Dumitriu wrote:
Anca Paula Luca wrote:
Marius Dumitru Florea wrote:
B) If the caret is at the beginning of a list item then indent that item (or outdent with Shift). By indent I mean make it a subitem of the previous list item.
+1, with the condition that list items should not become out of order, meaning that pressing tab will not create a third level item as a child of a first level item. Current editors allow something like this to
Would the following be considered a proper indentation? <ul> <li> <ul> <li>x</li> </ul> </li> </ul> This is the HTML generated for "** x" in xwiki/2.0. I think we should do the same in the WYSIWYG. Of course for this I'll have to overwrite the default list and indent/outdent support which currently generates invalid HTML for nested lists. Indent would then not only visually move the list item to the left but down also. [snip]
Regarding C), it's difficult to have the same behavior. What we can do is:
C1) Insert spaces (say 4); we would have to use non-breaking spaces of course.
+0. If users want to indent, they will be able to do that with spaces (since now spaces are meaningful). Not doing this will not convince users not to indent paragraphs; they will continue to do this using spaces, but they will have one more grudge against XWiki. I implied that the spaces are inserted at the cursor position, and not at the start of the paragraph.
Yes, spaces would be inserted at the caret position. [snip]
OTOH, not doing this means that there's no way to navigate out of the editor without the use of the mouse. And I strongly disagree with this. I don't like taking my hands off the keyboard. When I find something that doesn't work without the mouse in a site, the accessibility/usability pseudo-expert in me wakes up and gets very angry. VERY angry.
And you propose?
and also: C5) if the cursor is at the beginning of a paragraph it should indent the first line in the paragraph (the CSS way), but I am pretty sure that's too much trouble.
-0.5. This requires presentation rules to be embedded in the content. I know that many things will require the use of embedded style, but this is not essential, thus I'd rather avoid it.
-0
C6) Move to the start of the next block element (prev with shift).
-0, since no text editor does this (spreadsheet software does this, but that's the same as with tables).
-0
Other questions: - What does GoogleDocs do?
* Tab outside a list item or table cell inserts 4 spaces at the caret position or in place of the current selection (inside a span with no styles applied to it; I don't understand why they use a span since if you delete the spaces the empty span remains as HTML garbage) * Shift+Tab moves the focus out of the rich text area to the previous focusable element.. :| * [Shift+]Tab inside a table cell behaves as in Open Office. The selected text (if any) is not deleted. * Tab at the beginning of the first _empty_ list item indents the list using style="margin-left: 40px"; each Tab increases the left margin with 40px.. :| Shift+Tab removes the list.. :| * Tab inside a list item no matching the previous case indents the list item. Even in the middle of the text :|. Shift+Tab outdents. The selection is not cleared. * If the selection spans across more list items, but not all, then Tab indents those list items. Shift+Tab outdents. Selection is not cleared. * if the selection spans across all list items from a list then pressing Tab indents that list using CSS as previously described. Shift+Tab removes the list if the left margin is 120px.. :| * if the selection spans across more table cells then pressing a Tab deletes the selected text and inserts 4 spaces in the cell where the selection started :| Shift+Tab moves the focus out of the rich text area to the previous focusable element.. :| ...
- What happens when pressing tab in/on other types of content, like images, macros, definition lists, code (which is a kind of macro).
Each could easily have their own custom behavior. But let's decide first for paragraphs, list items and table cells.
- What happens when a selection exists? In one para, and cross-para?
It depends on the action taken: * Insert: deletes the selected text and places the inserted text where the selection started. * Indent: keeps the selection. * Navigate: you have to collapse the selection in order to move the caret. Thanks, Marius