Closed Bug 4696 Opened 26 years ago Closed 26 years ago

{feature} needs COLS attribute in style

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

All
Mac System 8.5
enhancement

Tracking

()

VERIFIED FIXED

People

(Reporter: sfraser_bugs, Assigned: peterl-retired)

Details

We in editor land would like to be able to control the COLS attribute on preformatted text from style. This will be used to control wrapping width in plain text mail compose.
Hardware: Macintosh → All
Change platform to all
Severity: normal → enhancement
Status: NEW → ASSIGNED
Target Milestone: M7
Will most likely add a "ch" unit (for characters) to 'width' property.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
"ch" unit is in place.
Simon: Could you please verify that this is fixed and if so, mark it verified? Thanks
Whiteboard: Requested verification by reporter
To test this, make a page with the following style: body { whitespace: -moz-pre-wrap; width: 80ch; } the text in this page should then wrap at 80 characters. I can't get this to work in the editor's plain text page now, so we can't mark this verified yet.
Status: RESOLVED → REOPENED
Agreed: this doesn't seem to be working. I've tried -moz-pre-wrap and moz-pre-wrap with width set to 40 characters, but text doesn't wrap, either on initial layout or when I type in new text.
Resolution: FIXED → ---
Whiteboard: Requested verification by reporter
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
QA: this was our problem in the way we were setting style. Peter showed me what we needed to fix, and it's working now. Test it if you want to be sure, otherwise go ahead and mark it verified.
Could you describe the correct usage here?
Here's something that works if specified in EditorInitPagePlain.html. (I have it moved into C++ code in my tree, expect to be ready to check in tomorrow.) BODY { white-space: -moz-pre-wrap; width: 72ch; font-family: -moz-fixed; background-color: rgb(255, 255, 255); margin: 4px 4px 4px 4px; } In addition, the bodyElement->SetAttribute("style", ...) call in nsTextEditRules.cpp is wrong -- it overrides the style in the init page to a non-wrapping preformatted style.
Status: RESOLVED → VERIFIED
Using revised test case with 8/16 Apprunner, verified bug fixed. Text wraps using "ch" unit for width.
You need to log in before you can comment on or make changes to this bug.