[Mozile] Mozile 0.7.5 integration
James A. Overton
james at overton.ca
Wed May 3 11:24:59 EDT 2006
Hi Dennis,
Sounds like a pretty old version. Hopefully we can get you up and
running.
1) Use mozile.getEditors() to get the array of elements you want.
These are the ones that have had XBL editing widgets attached to them
by mozile.createEditor().
2) There's a system for setting global options (getOption,
setOption), but the system for setting editor specific options never
got finished. You might want to stick to the attribute-based method
you were using.
When "enter" is pressed Mozile will add "\n" when the CSS "white-
space" is "pre", and otherwise will try to split the block. I'm not
sure exactly what you want, but you can either mess around with
mozileHandleKeypress() or MozileMediator.splitBlock() if you need to
change that.
3) I never implemented a text-only mode, and the context-sensitivity
is primitive. You have two options here:
A. Hack at mozileHandleKeypress() or MozileMediator.executeCommand()
to disable the commands you don't want to use when your special
attribute is set.
B. Improve the content-sensitivity, starting with something like
MozileCommand.isAvailable(), so that commands won't execute when the
special attribute is present.
Sorry for the bad news. The good news is that Mozile 0.8 should make
these things much easier. I know that probably isn't much comfort,
and what you'd really like is Mozile just to be stable and complete!
That's exactly what I want, too! :^)
It certainly frustrates me that it's taking so long. All I can say
is that it's been a long road discovering how to do this properly,
and I think the new version is finally getting it right. Hopefully
it'll be worth the wait.
Good luck,
James
On 2006-May-03, at 8:59 AM, Dennis Thrysøe wrote:
> Hi,
>
> A while back I integrated what I believe is mozile version 0.7 into
> a project.
>
> In order to make this work there were certain changes I needed to
> make; both to fix some things that didn't work for me, and to make
> mozile do a little bit more for me :)
>
> To get rid of some of the cursor-related problems etc. with that
> version I'm now trying to integrate mozile 0.7.5 into the product
> instead.
>
> Many of my own changes aren't necesarry anymore, but there are a
> few issues left that I'm seeking a little help with:
>
> 1) In 0.7 there was an editorList that contained all of the
> editable DOM elements. Then and now I create the editors based on a
> CSS selector (*[contentEditable="true"]). Is there any good way to
> get these elements in 0.7.5. I just need a place to start (obtain
> the elements); from there I can write the handling myself.
>
> 2) I implemented custom disabling of linefeeds based on an
> attribute on the editable element. Is there a better way to do this
> nowadays?
>
> 3) The same goes for formatting in general (I had a text-only mode,
> so: no XHTML). Any better ways to do this based on an attribute on
> the "contentEditable" element?
>
>
> Any help appreciated.
>
> -dennis
>
> ----------------------------------------------------------------------
> -----
> The information in this email is confidential and may be legally
> protected.
>
> _______________________________________________
> Mozile mailing list
> Mozile at mozdev.org
> http://mozdev.org/mailman/listinfo/mozile
More information about the Mozile
mailing list