> Neil wrote:
> >This is one way of doing it:
> > From the composer window, select tools, options, javascript console and
> >type in
> >top.opener.GetCurrentEditor().wrapWidth = 120
> >Evaluate that and "120" should appear to the bottom of the console.
> >Note that if you do not set a wrap width then the default is 72.
Alexander writes:
> Thx for the answer. The setting you mention works but doesn't seem to be
> a permanent change. I was hoping there would be a user.js solution
> (which I couldn't find on webs Mozilla or Google).
It was certainly always the intention that it be user settable.
That's how it's supposed to work: line length should be controllable
in html as well as plaintext modes.
Grepping for "Pref" under editor/libeditor yields:
base/nsEditor.cpp: (void) prefBranch->GetIntPref("editor.htmlWrapColumn",
aWrapColumn);
That's in nsEditor::GetWrapWidth, and I wonder if that's really the best
way to do it (it will check the pref every time); wouldn't it be better
to check it once, then set an observer on the pref? But nevertheless,
it looks like that pref is intended to do what you want.
However, I just tested it (in 1.5RC1) and it doesn't work. In fact,
looking at the source, nobody outside nsPlaintextEditor ever calls
GetWrapWidth(). This is a bug, not intended behavior; please file it.
Assign it to me -- I can look into it, shouldn't be too hard to fix
(maybe I'll fix the way the pref is handled while I'm in there, unless
anyone objects).
...Akkana
_______________________________________________
mozilla-editor mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-editor