Results 1 to 8 of 8

Thread: DHTML Web Editor

  1. #1
    Join Date
    Mar 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Web Editor

    1) CODE TITLE:
    DHTML Web Editor
    2) AUTHOR NAME/NOTES:
    wav syntax
    3) DESCRIPTION:
    You type your code in the text box below, when you're finished you simply press the "Alt" key on your keyboard and the result of your code will show up instantly in the top frame.
    4) URL TO CODE:
    http://www.wavsyntax.com/edit.php

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    It kind of "flickers", and doesn't work so well in Firefox. I have menus enabled when you press "alt" and they still open. Also, the default text that's in the box is invalid. Should be something like:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Title of my page</title>
    </head>
    <body>
    
    </body>
    </html>
    Not a bad idea though, I must admit.
    - Mike

  3. #3
    Join Date
    Mar 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You're absolutely right, I should have included the doctype tag,
    It's a common thing I forget to do, as well as the title element.

    as far as the flicker is concerned I think I can fix that, I haven't looked at the code in a while but I think the problem with that probably lies in the fact that the function to update the frame might be in both an onkeyup and onkeydown event (I originally planned it that way for a purpose I can no longer remember at this point lol), I'll probably end up fixing that sooner or later...

    Hmmm, as far as the alt button not working, think I should make it update via button, which would make it work in any case, the only drawback would be that of simplicity though, I also could hot key it though, somethign like Ctrl+Shift.

    I didn't have the Alt key problem though so this is something I wasn't expecting.

    I appreciate you taking the time to try it out though and letting me know whether there was anythign wrong with it.
    Any further suggestions would be much appreciated.

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I think that this little script/program may have potential; after you update those few things that mburt pointed out. As for the alt key thing, I would place a button on the "editor" somewhere just in case.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Mar 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, I've decided to fix those bugs a minute ago, I've also added a full screen view as well for the input edit.

    Now I just need to find a cross browser method of inserting text at cursor position and replacing selected text, I can do this without a problem in IE but I need to do some Googling before I can do it in FF.

    I plan on adding a lot more features to this, like that of my Dynamic Web Studio program, which this script is originally based on.

    Preview
    Download

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Seems to work pretty well in limited testing in Opera.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    FF seems alright, justs glancing at it.

    What does it actually do in the end? Would it allow to save to the server? Perhaps this could be integrated into a CMS.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Mar 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    FF seems alright, justs glancing at it.

    What does it actually do in the end? Would it allow to save to the server? Perhaps this could be integrated into a CMS.
    I've thought about giving this script the capability to save files to my server eventually once it becomes more than just a basic text editor with an output frame, if I do I'd allow users to save the code to a file in a folder with the user's visitation number appended to the file so to differentiate each one from the other, and just for security reasons I'll make it so that each file must be a .html file in order to not allow access to PHP by possible destructive users.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •