473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Who wants to participate in writing an open source web-based programmer's editor?

Hi...
We want to write an open source web based TEXT editor and would be
happy about any help ;-)

Please notice: We do NOT want to write a web based WEB editor, where
you can edit a web page without knowing HTML - we want to write a real
programmer's editor located on a web page in your browser with
features like...

- Syntax Highlighting
- Tab, Indent/Deindent
- Tags & Commands List with Integrated Help
- Set and Jump To Marks
- CSS Tool
- Folding
- etc.

Right now we have just a bit more than the basic framework, but some
things already work: You can edit text ,-) Syntax Highlighting is
impemented (with bugs), indent/deindent works more or less and we have
a little menu popup. And: The program has a nice OO design ;-)

So, if you are a javascript guru and longing for a new adventure, come
join us and take a look at...

http://baseportal.com/htmledit

We set up a little CVS - if you like you could check out the source
and start programming right away...
Any help is welcome! ;-)
Best regards,

Christoph...
PS: It looks like it will be the first web-based programmer's editor -
we searched a lot but didn't find any other project like this - please
correct me someone if I'm wrong...
Jul 20 '05 #1
12 2105
la*******@hotmail.com (Christoph Bergmann) writes:
We want to write an open source web based TEXT editor and would be
happy about any help ;-)


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.
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?

Why doesn't the HTML validate?

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).

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).

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?

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
Lasse Reichstein Nielsen <lr*@hotpop.com> wrote in message news:<3c**********@hotpop.com>...
la*******@hotmail.com (Christoph Bergmann) writes:
We want to write an open source web based TEXT editor and would be
happy about any help ;-)
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.


No problem ;-) Thats what discussions are for...

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?
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...

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).
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.

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).
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

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?
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?


/L


Best regards,

Christoph...
Jul 20 '05 #3
On 23 Oct 2003 13:41:20 -0700
la*******@hotmail.com (Christoph Bergmann) wrote:
<snip>
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.

<snip>

Sorry. But you hit a hot button here. Opera is probably more standards
compliant than the other two. Certainly more compliant than IE. Why do
you just assume that Opera is not capable? How can you argue for
"cross-browser compatibility" when you know so little about Opera? I am
assuming that you intend to follow W3C standards and not MS "standards."

--
Life is an offensive, directed against the repetitious mechanism of the
Universe.
--Alfred North Whitehead (1861-1947)
Jul 20 '05 #4
Albert Wagner wrote:
la*******@hotmail.com (Christoph Bergmann) wrote:
<snip>
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. <snip>

Sorry. But you hit a hot button here. Opera is probably more standards
compliant than the other two.


Probably not. You may want to check out what part of the
standards/recommendations Opera does not obey and then
compare with Mozilla/5.0, for example.

http://www.opera.com/docs/specs/opera6/
http://www.opera.com/docs/specs/

When it comes to standards compliance, the order is like
Mozilla/5.0, IE 6.0 SP-1, Opera (from best to worst). In
contrast, when it comes to speed it is still (alas!)
vice-versa.
Certainly more compliant than IE.


Opera even still (v7.11) supports IE-proprietary document.all
when User-Agent is set to IE and its CSS support is still far
from obeying the CSS1 specification as well as W3C-DOM is still
far from being usable, so please don't try to tell us that Opera
is standards-compliant or even more standards-compliant than
Mozilla/5.0 or IE. Thanks.
PointedEars

Jul 20 '05 #5
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
When it comes to standards compliance, the order is like
Mozilla/5.0, IE 6.0 SP-1, Opera (from best to worst).
Which standards are we talking about here?

When it comes to CSS, IE is by far the worst. It fails *basic* CSS 2
features like attribute-selectors, adjacent and child selectors, and
position:fixed. IE 6 is better that any previous IE, but still very
far from CSS 2 compliance. IE completely disregards the W3C DOM 2
Events specification.

I admit that Mozilla supports most standards at least as well as
Opera. Opera is still the second best browser I know, standards
compliance-wise.
Certainly more compliant than IE.


Opera even still (v7.11) supports IE-proprietary document.all
when User-Agent is set to IE


It supports it no matter what the User-Agent string is set to.
However, what does support for proprietary features have to do with
standards compliance? You can be fully standard compliant and have
extra features. What breaks standards compliance is the absence,
or incorrect behavior, of standard features.
and its CSS support is still far from obeying the CSS1 specification
They claim to support all of CSS 1. Since Håkon Lie, one of the authors
of the CSS 1 specification, works for Opera Software, I bet they know
what they are talking about.

Can you tell me which parts of the CSS specification they are missing
(there must be more than one, if they are "far from" obeying it)?
as well as W3C-DOM is still far from being usable,
What are you missing? I haven't needed any W3C-DOM 2 feature in Opera
that existed in IE (not saying they aren't there, I just haven't
needed them).

At least they tell su which parts are not supported.
so please don't try to tell us that Opera is standards-compliant
I will say that Opera is *far* more standards compliant than IE.
I can't think of one standard that both IE and Opera claims to
support where Opera has worse support than IE.

or even more standards-compliant than Mozilla/5.0 or IE. Thanks.


IE might have support for *more* standards, but they are generally
badly supported. Ok, I mighe be biased by working a lot with CSS, and
IE *really* sucks there!

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #6
On Fri, 24 Oct 2003 16:57:13 +0200, Thomas 'PointedEars' Lahn
<Po*********@web.de> wrote:
Opera even still (v7.11) supports IE-proprietary document.all


Which is no way wrong by any standard. It's bad IMO that more
browsers don't provide it.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #7
Albert Wagner <al******@tcac.net> wrote in message news:<20031023180411.64078c89.al******@tcac.net>.. .
On 23 Oct 2003 13:41:20 -0700
la*******@hotmail.com (Christoph Bergmann) wrote:
<snip>
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.

<snip>

Sorry. But you hit a hot button here. Opera is probably more standards
compliant than the other two. Certainly more compliant than IE. Why do
you just assume that Opera is not capable? How can you argue for
"cross-browser compatibility" when you know so little about Opera? I am
assuming that you intend to follow W3C standards and not MS "standards."


I didn't write that IE or Mozilla is more standards compliant than
Opera.

I wrote "I THINK only IE and Mozilla can do it (please correct me if
I'm wrong)". You wrote "Why do you just assume that Opera is not
capable?" - is my assumpation wrong? Is there a way to let the user
edit elements in Opera? If yes, why don't you write how or give a link
where its explained?
To come back to the point:

We WANT to write an open source web-based programmer's editor running
on a web page. We WANT it to work in as many browser as possible, not
only in IE (thats why i used the term "cross-browser"). The program is
NOT READY. There are lots of bugs and lots of stuff missing...

Thats why I did the original post. Everybody is invited to join us:

http://baseportal.com/htmledit

If you know better ways (more standards compliant) to do parts of the
code, then check out a copy and do it ;-)

Best regards,

Christoph Bergmann
Jul 20 '05 #8
On 26 Oct 2003 10:27:33 -0800
la*******@hotmail.com (Christoph Bergmann) wrote:

<snip>
I wrote "I THINK only IE and Mozilla can do it (please correct me if
I'm wrong)".
The "only" means that you think none of the other browsers can.
You wrote "Why do you just assume that Opera is not
capable?" - is my assumpation wrong?
Which assumption? That Opera is not capable? Or that you intend it's use
to be "cross browser". One or the other is wrong.
Is there a way to let the user
edit elements in Opera? If yes, why don't you write how or give a link
where its explained?


Not sure what you mean by "user" here. Are you meaning the programmers
of your editor or the end user? Same with "elements." I assume you are
referring to DOM elements. The real problem with your post, for me, was
similar to problems with programmers of browser sniffers that make the
assumption that a browsers name tells you all you need to know about a
browser's capabilities. This method of sniffing has been thoroughly
debunked on this group. Why don't you just specify what browser
specific capabilities should be available to run the editor? Then it
would be fairly straight forward to compare with any browser's features.
If your design specs haven't proceeded far enough to do this, then it
is premature to claim that it will be "cross browser."

I don't mean to start a flame. I've said all I intend to say and I wish
you well with your project.

<snip>

--
Life is an offensive, directed against the repetitious mechanism of the
Universe.
--Alfred North Whitehead (1861-1947)
Jul 20 '05 #9
Albert Wagner <al******@tcac.net> writes:
On 26 Oct 2003 10:27:33 -0800
la*******@hotmail.com (Christoph Bergmann) wrote:

<snip>
I wrote "I THINK only IE and Mozilla can do it (please correct me if
I'm wrong)".


The "only" means that you think none of the other browsers can.


Yes, exactly. I think the same. Are we wrong?
Why does that hit a hot button on you?
You wrote "Why do you just assume that Opera is not
capable?" - is my assumpation wrong?


Which assumption? That Opera is not capable?


Yes: That Opera is not capable of understanding "designMode" (or
"contentEditable"). And it isn't.

Nobody *blames* Opera for not implementing this proprietary feature
(a feature that I think is completely ludicrous to begin with).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #10
Albert Wagner <al******@tcac.net> wrote in message news:<20031026204713.43a44fb8.al******@tcac.net>.. .
On 26 Oct 2003 10:27:33 -0800
la*******@hotmail.com (Christoph Bergmann) wrote:
You wrote "Why do you just assume that Opera is not
capable?" - is my assumpation wrong?
Which assumption? That Opera is not capable? Or that you intend it's use
to be "cross browser". One or the other is wrong.


Well, since you wrote the question "Why do you just assume that Opera
is not capable?", thus, of course I meant the assumption that Opera is
not capable... In a complete sentence: Is my assumption, that Opera is
not capable, wrong?

By the way, "cross browser" in its pure meaning says: "in more than
one browser", nothing more... (It does NOT mean "in all browser ever
written, starting from Nexus via Mosaic to Lynx")

Is there a way to let the user
edit elements in Opera? If yes, why don't you write how or give a link
where its explained?


Not sure what you mean by "user" here. Are you meaning the programmers
of your editor or the end user? Same with "elements." I assume you are


Of course the end user. A programmer does the thing, the user uses
it...

referring to DOM elements. The real problem with your post, for me, was
Yes, DOM elements...

debunked on this group. Why don't you just specify what browser
specific capabilities should be available to run the editor? Then it
would be fairly straight forward to compare with any browser's features.
If your design specs haven't proceeded far enough to do this, then it
is premature to claim that it will be "cross browser."
I didn't really claim anything about "cross browser"... Lasse
Reichstein Nielsen copied it from the source and this source is far
from being ready or nice or whatever. Its a quick start to see how it
will look and to have something to work with. The "cross browser" was
a comment to indicate that the editing now works in IE and Mozilla
(since an earlier version worked in IE only)...

I can't believe we're really discussing about this.....


I don't mean to start a flame. I've said all I intend to say and I wish
you well with your project.


Thanks ;-)
Best regards,

Christoph Bergmann
Jul 20 '05 #11
"Christoph Bergmann" <la*******@hotmail.com> wrote in message
news:c0**************************@posting.google.c om...
<snip>
Which assumption? That Opera is not capable? Or that you intend
it's use to be "cross browser". One or the other is wrong.
Well, since you wrote the question "Why do you just assume that
Opera is not capable?", thus, of course I meant the assumption
that Opera is not capable... In a complete sentence: Is my
assumption, that Opera is not capable, wrong?


Because Opera 7 has a dynamically manipulatable DOM it is in principal
possible to script it into a text editor. The script would be
horrendous, you would have to be a complete masochist to attempt it, and
it would still fall short if IE's built in capabilities (not much chance
of reading from the OS clipboard for example and working out the
insertion point with a non-fixed width font would be a pain). Though, if
written, the result should also stand some chance of working on
Konqueror, Safari and ICEbrowser as well.
By the way, "cross browser" in its pure meaning says: "in more
than one browser", nothing more... (It does NOT mean "in all
browser ever written, starting from Nexus via Mosaic to Lynx")

<snip>

I would categorise a script that was designed to work in more than one
browser as "multi-browser". Trying to use that definition for "cross
browser" should not be acceptable, two is more than one, so should a
script that was designed to work only with Firebird and Mozilla, or
Konqueror and Safari be allowed to describe itself as cross browser?
That would be an incredibly low standard.

I would take "cross browser" as meaning "across browsers" and as a
result unrestricted to any sub-set of browsers (though I would allow
"across HTML browsers" [1]). Of course no script will successfully
execute in all browsers (in the same way as no script will successfully
execute in the latest release of IE 6 if active scripting has been
disabled). And that means that "cross browser" scripting involves
anticipating and planning for the failure of the script as well as its
successful execution.

You browser based text editor will never be cross browser (it will be a
very long time before any non-desktop PC browsers have access to the
resources to even consider implementing editable content outside of
textarea and input type="text" fields). It might be best to just state
which browsers the editor does work with (and maybe stress how common
they are) and avoid giving anyone expectations that must be
disappointed.

Richard.

[1] I don't have any problem with saying that a cross browser HTML DOM
manipulating script should not even be expected to work in a browser
designed exclusively for some other mark-up language, in principal it
should not even be attempted to be loaded in such an environment.
Jul 20 '05 #12
On 27 Oct 2003 09:56:43 +0100
Lasse Reichstein Nielsen <lr*@hotpop.com> wrote:
<snip>
Yes: That Opera is not capable of understanding "designMode" (or
"contentEditable"). And it isn't.

<snip>

Thanks, Lasse. This clears up everything for me: they are using
proprietary features and therefore a very limited definition of
"cross-browser."

--
Life is an offensive, directed against the repetitious mechanism of the
Universe.
--Alfred North Whitehead (1861-1947)
Jul 20 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robert Hathaway | last post by:
COMP.OBJECT FAQ Version II Beta now Available http://www.objectfaq.com/oofaq2 ================================================== - Latest Important Information on Object Technology - What's New...
2
by: Scott Vercuski | last post by:
Everyone, I'm having trouble writing an event to the event log. Here is the chunk of code I currently have. ----------------------------------------------------------------------- Private...
20
by: parametriceq | last post by:
Hello, I just realized there's only a "g" separating me from....me? Old Coder or Old Codger? Anyway, I haven't programmed since the late 80's. My experience then was with DEC PDP-11's and...
4
by: sam | last post by:
Hi I would like to implement a ssl client (with C++ API) to communicate with a unix system sshd server. Can anyone please tell me a guideline or an example for doing so? I found TAO has SSL...
24
by: sundew | last post by:
Hi all, I am developing an open source DHTML project named Wednus Window. http://wednus.com Wednus Window is a DHTML Web-Application Windowing System. It shell websites/web-applications with...
1
by: Lauchlan M | last post by:
I get the following error. Apart from the fact that it does not make any grammatical sense, what would be likely to be causing it? The background is that nxCmdDeleteErrorLogItem is a delete...
4
by: HNguyen | last post by:
Hi, I have a Web application in ASP.NET. My Application allows the users upload files into the server after checking their user names and passwords. For each transaction, the Web program will...
10
by: musosdev | last post by:
Hi guys I'm trying to migrate to VS2005... I've managed to do that, but realised I'd opened my web projects as file projects, and I'm getting the error about network BIOS command limit. ...
6
by: rekaeps | last post by:
We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles sending e-mail from the server when accessing the web site from a separate client computer. Also, in the same scenario,...
16
by: jim | last post by:
Microsoft announced that it will be releasing its source code for the .Net libraries. But, don't get too excited at Microsoft's new SHARED source initiative. According to CNET (at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.