#10310 closed enhancement (fixed)
RTE: Normalize Indent and Outdent operations in Editor
Reported by: | Jared Jurkiewicz | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Editor | Version: | 1.4.0b |
Keywords: | Cc: | bill, liucougar, Douglas Hays, Adam Peller | |
Blocked By: | Blocking: |
Description
The indent and outdent code of the browser do not work very well. They're inconsistent about using blockquote versus div with padding ... and all browsers (IE, FF, WebKit?), indent/outdent lists wrong, they generate malformed lists.
So, like the EnterKeyHandling? plugin, it would be nice to have a way to handle indent/outdent consistently across browsers following a style indent pattern (much like other RTE do).
I have a prototype implementation that does this (and seems to work really well). It even fixes malformed lists from previous indent/outdent ops on a doc. It does not convert blockquote indent/outdent, though (not sure how to do that safely yet. Maybe as a prefilter operation to convert all blockquote tags to an indentable div).
Attachments (1)
Change History (7)
Changed 11 years ago by
Attachment: | indentOutdent.zip added |
---|
comment:1 Changed 11 years ago by
The prototype does the following:
1.) Uses customUndo on all browsers, as it has to manipulate the DOM directly.
2.) Fixes malformed lists (if they were created/indented wrong in the first place).
3.) Handles cross-selection indenting (indents elements that are indentable, will wrap inline elements within an indentable div as necessary.
Tests indicate that it seems to work really well. Feedback would be appreciated.
comment:2 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|
comment:3 Changed 11 years ago by
Milestone: | 1.5 → 1.4 |
---|
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [20772]) Adding in experimental NormalizeIndentOutdent? for 1.4. Since experimental, is okay to add at this stage. \!strict fixes #10310
Prototype of indent/outdent handler.