Closed Bug 27266 Opened 26 years ago Closed 26 years ago

Remove All Styles should work for all text attributes, not just B,I,U

Categories

(Core :: DOM: Editor, defect, P1)

All
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cmanske, Assigned: mozeditor)

References

Details

(Whiteboard: Composer feature work)

Current implementation of this loops 3 times through RemoveInlineProperty for B, I, and U. First, this ignores all other inline HTML attributes. Second, it is inefficient. We should make nsHTMLEditor::RemoveInlineProperty remove all inline attributes during the same iteration search through nodes in the selection.
Status: NEW → ASSIGNED
Target Milestone: M15
it doesn't even work for B, I, U
Also, using this to turn off all text attributes at a collapsed selection (caret point) needs work. It currently doesn't work at all. I tried changing attribute names from 'B', 'I', and 'U' to 'b', 'i', and 'u', and then it acted strange: Using command in bold text did turn of bold, but it turned on italic and underline! This needs investigation.
*** Bug 26994 has been marked as a duplicate of this bug. ***
Joe says he was planing on doing this. We need to replace existing JS with an nsEditor::RemoveInlineAttributes() (or some name like that.) It should "remove all inline nodes that are also containers" as Joe says, but it should NOT remove <a>, i.e., links.
Assignee: cmanske → jfrancis
Status: ASSIGNED → NEW
Joe: After you implement the nsEditor method, please use it to change nsEditorShell::RemoveTextProperty() for the case when "prop" = "all". Or you can reassign this to me and I'll fix up that code.
Blocks: 28969
moving to M16
Target Milestone: M15 → M16
updating keyword and status whiteboard to reflect that this is a beta 2 feature work bug that the Composer team deems a must fix for beta 2.
Severity: normal → major
Keywords: beta2
Priority: P3 → P1
Whiteboard: Composer feature work
i accept Bugzilla as my lord and savior.
Status: NEW → ASSIGNED
fixed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Keywords: nsbeta2
verified in 4/26 build.
Status: RESOLVED → VERIFIED
Keywords: beta2
You need to log in before you can comment on or make changes to this bug.