Lasse Reichstein Nielsen <lrn@hotpop.com> wrote in message news:<3cdk489v.fsf@hotpop.com>...[color=blue]
>
lalakaka2@hotmail.com (Christoph Bergmann) writes:
>[color=green]
> > We want to write an open source web based TEXT editor and would be
> > happy about any help ;-)[/color]
>
> Let's play the devils advocate (I love doing that :P ). That means that
> the questions I ask are not necessarily criticism. It's just something
> you should be able to answer before going much further.[/color]
No problem ;-) Thats what discussions are for...
[color=blue]
> What is the purpose of writing it at all? There are plenty of free,
> not-web-based editors out there. Why will anybody want to use your
> editor instead of one of these?[/color]
There are also plenty of not-web-based WYSIWYG web editors out there
(Dreamweaver etc.), but in the last years you've seen dozens of
web-based scripts (like "htmlarea") doing the same in the browser
(mostly with limited possibilites). I think the main reason is: "Speed
of use", I mean you don't need to install anything - you call a web
page and there you go... ;-)
To be more precise: I organize my work in a browser-centric way - I
can edit all my web pages via the browser (which is extremely useful
to me when I'm not at my own computer), but right now I do this with a
simple textarea... A web-based text editor would be wonderful to me...
;-) Thats why we started wroting one, since we didn't find any other
out there...
[color=blue]
> Which browsers is it supposed to work in?
> You write:
> this.doc.designMode="on"; // let the user edit the element (cross-browser)
> That is *not* cross browser. It might be IE and Mozilla, but that is about
> it. It doesn't work in my browser (Opera 7).[/color]
Surely it can only work in browsers that support editing of web pages
or elements of it. "cross-browser" in this case means: We want to
support all browsers that are able to. We can't work miracles, if the
browser doesn't support it or there is no javascript its not possible
;-)
Right now I think only IE and Mozilla can do it (please correct me if
I'm wrong), but perhaps Opera will support this in the future since
its a really useful feature.
[color=blue]
> You write:
> document.write("<b class=menueitem id="+menue_id+
> " href='javascript
:changes("+(i+1)+")' onMouseover=changes("+(i+1)+")>")
>
> It is not recommended to use javascript
:-URI's. Use the onclick attribute
> instead. <URL:http://jibbering.com/faq/#FAQ4_24>
>
> You write:
> function sc(r,g,b)
> {
> ri=isNaN(r)? ....
> You should make "ri" an local variable. This just pollutes the global
> namespace.
>
> You write:
> dsub_obj.innerHTML = ""; // to be sure ;-)
> right after using document.getElementById. Why not use DOM methods
> to empty the object, and only fall back on proprietary methods like
> innerHTML if the standards compliant methods aren't available.
>
> Your code can fail in a standards compliant browser without innerHTML.
> (No, I don't know of one, but it might exist now, or maybe later).[/color]
You judge too hard ;-) - we just started to build this program, its
version 0.0.2 and of course its not perfect and needs a lot of work
and testing... And everybody has different techniques and goals - me,
personally, I'm more pragmatic and want to get the thing run fast -
cleanup comes afterwards... Some of the code (the one with the global
"ri") was copied from another project (and this was a quick hack ;-) )
and needs adaption. But one step after another...
If you want to improve our code - you are cordially invited ;-)
Its open source and a little CVS is available, just check out a copy
and do whatever you think is necessary ;-)
http://baseportal.com/htmledit/minicvs/work
[color=blue]
> Why all the document.write's? You can build your interface in HTML
> instead of writing it, or you can use DOM methods to insert it.
> Is there a reason behind using document write?[/color]
I think I didn't wrote the part you mean (right now we are 3
programmers) so I can't tell you the exact intends of the one who did
it. But I guess its not directly in HTML because with document.write
you can control the output. Whats wrong with document.write anyway?
[color=blue]
>
> /L[/color]
Best regards,
Christoph...