[Zope-CMF] contenteditable for mozilla

Gitte Wange gitte@mmmanager.org
28 May 2002 21:30:37 +0200


tir, 2002-05-28 kl. 19:26 skrev David Harvey (Hamish):
> On Tue, 2002-05-28 at 17:43, Gitte Wange wrote:
> > tir, 2002-05-28 kl. 16:35 skrev seb bacon:
> > > http://xopus.org/index.jsp?menu=mozce
> > > 
> > > I'm so pleased someone's done that :-)
> 
> Looks like an excellent start.
> 
> > > seb
> > 
> > It looks cool but ... 
> > I'm using Galeon so maybe it isn't working like expected.
> > I cool get some sort of dashed border around the title box ... but
> > hitting ctrl+i or ctrl+b made the text disappear ... 
> 
> Well, I guess the authors do say that it isn't bug free - and it isn't.
> I find it can't cope with the Enter key, and tends to insert characters
> in the wrong order on occasion. Nonetheless it's a huge step in the
> right direction. Ctrl+i and ctrl+b work fine for me, as it happens
> (mozilla build 2002052321). Caret browsing didn't work in mozilla 0.9.9,
> but does now I've upgraded.

I will try with mozilla later ... 
Just thought that it might work with Galeon since it uses mozilla code
:-)

> > So I'm a bit confused about what I can use this niffy little script for
> > ...
> > 
> > Can it be used to some sort of WYSIWYG-editor stuff on your edit pages
> > in CMF ?
> 
> Given a bit more work, I'm sure it could be. At the very least, it would
> let you edit smaller chunks of text which depend less on advanced
> formatting, such as the content of news items, and descriptions of
> various content types, discussion items. One of the real beauties of
> this is that I'm not constrained to type into a text box, can see
> (roughly - given the markup to let me know what I can edit) what the
> result will look like, because I'm editing the result. I'd guess a full
> wysiwyg editor is a way off yet, and the enter bug seems a show stopper
> to me!

Well the enter bug can be fixed ....
I have looked into the code and it doesn't seem that complex.

> Also: I can't work out if it is possible in the IE5.5 version of this
> feature to go into list mode within, say, an editable DIV (that is, are
> there keystrokes that let you insert elements into the DOM?) but if you
> push a list into the dom, it renders and you can edit it. If you put the
> cursor at the end of a list item and press return, you get a new list
> item. Perhaps the behaviour is: return closes the current element and
> starts a new on identical to it, or something. Backspace on an empty
> list item closes the list. I suspect it would need some javascript work
> to make a more competent editor.

The enter bug doesn't seem to appear in IE ... 

Maybe this would be an excellent opportunity to help create something
very useful for other browsers than IE.
I'm not a javascript/DOM/whatever expert but I can see what the code is
all about.
The only thing I haven't figured out just yet is how to submit the text
if it is in a <div> tag and not in a textarea ... but I am pretty sure
that there are someone out there that has a solution to this :-)
So maybe we should tell the guys at Xopus that they are really doing a
good job and we would love to contribute in what way we can ???

The script actually works - it's buggy but it works. And I really think
this editor stuff is a big missing thing in Zope when presenting the
system to customers.
So maybe if we all put in a small amount of effort here we can increase
the overall value of Zope ?

Just my 0.02,
Gitte Wange