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

Discussion in 'Javascript' started by Christoph Bergmann, Oct 23, 2003.

  1. 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...
    Christoph Bergmann, Oct 23, 2003
    #1
    1. Advertising

  2. (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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Oct 23, 2003
    #2
    1. Advertising

  3. Lasse Reichstein Nielsen <> wrote in message news:<>...
    > (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...
    Christoph Bergmann, Oct 23, 2003
    #3
  4. Re: Who wants to participate in writing an open source web-basedprogrammer's editor?

    Albert Wagner wrote:
    > (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
    Thomas 'PointedEars' Lahn, Oct 24, 2003
    #4
  5. Thomas 'PointedEars' Lahn <> 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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Oct 24, 2003
    #5
  6. Christoph Bergmann

    Jim Ley Guest

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

    On Fri, 24 Oct 2003 16:57:13 +0200, Thomas 'PointedEars' Lahn
    <> 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/
    Jim Ley, Oct 24, 2003
    #6
  7. Albert Wagner <> wrote in message news:<>...
    > On 23 Oct 2003 13:41:20 -0700
    > (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
    Christoph Bergmann, Oct 26, 2003
    #7
  8. Albert Wagner <> writes:

    > On 26 Oct 2003 10:27:33 -0800
    > (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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, Oct 27, 2003
    #8
  9. Albert Wagner <> wrote in message news:<>...
    > On 26 Oct 2003 10:27:33 -0800
    > (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
    Christoph Bergmann, Oct 27, 2003
    #9
  10. "Christoph Bergmann" <> wrote in message
    news:...
    <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.
    Richard Cornford, Oct 27, 2003
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis Esteban Valencia
    Replies:
    1
    Views:
    648
    Joe Fallon
    Jul 3, 2005
  2. Robert Hathaway
    Replies:
    0
    Views:
    417
    Robert Hathaway
    Jul 29, 2003
  3. Robert Hathaway
    Replies:
    0
    Views:
    419
    Robert Hathaway
    Jul 29, 2003
  4. Stylus Studio
    Replies:
    0
    Views:
    652
    Stylus Studio
    Aug 3, 2004
  5. Robert Hathaway
    Replies:
    1
    Views:
    458
    Robert J Hathaway III
    Jul 29, 2003
Loading...

Share This Page