SnipDHTML Editor

A web-based "round-trip" HTML edi­tor. You can code HTML and see how it looks on the side, or write text with for­mat­ting and see cor­re­spond­ing HTML inter­ac­tively. Uses IE spe­cific func­tions so cur­rently works only with IE, but should give you ideas.

Fol­low­ing is a link to a web-based "round-trip" HTML edi­tor. You can code HTML and see how it looks on the side, or write text with HTML for­mat­ting and see cor­re­spond­ing HTML inter­ac­tively. Uses IE spe­cific func­tions so cur­rently works only with IE, but should give you ideas even if you want to work with other browsers.

11 comments
  1. tog_benson says: May 28, 20036:56 pm

    When do you think we will be able to insert images into the page? It wouldn't be a prob­lem for me to have an images folder sit­ting in the folder with the edi­tor. Is this some­thing i will have to code on my own?

  2. zan_gligorov says: May 28, 20036:57 pm

    add this function:

    func­tion doIn­ser­tIm­age()
    {
    var tr= frames.myEditor.document.selection.createRange()
    tr.execCommand("InsertImage", true);
    doCopy­Value();
    }

    Then add a new icon on the toolbar:

    and that is it.

  3. sniptools says: May 28, 20036:57 pm

    Thanks zan! I guess you emailed me with th is note? Never really got down to adding that code, but hope peo­ple get ideas from here.

  4. Kosala says: May 30, 20037:32 am

    Dear Shashank Tripathi,

    I have to say, you are pretty damn hon­est with your sw 'SnipDHTML Edi­tor'. I thought I'll drop an email to say thank you for let­ting me using this sw. I'll leave the copy­right text on the script.

    Keep up the good work and thank you dearly.

    Kos­ala

  5. Luis Majano says: Jun 20, 20034:04 am

    Great Edi­tor, fully using the W3C Doc­u­ment Object Model. The only thing I have doubts is on insert­ing, mod­i­fy­ing, delet­ing tables and the use of stylesheets. For exam­ple, read­ing the style sheet and pre­sent­ing a drop down for adding the style sheet. Does any­body have any ideas??

    I cur­rently revamped this edi­tor to work with Cold­Fu­sion and Dynam­i­cally load tem­paltes for edit­ing and revi­sion. A great Con­tent Man­ager. I also made it so that a non-html header can be read, mod­i­fied and updated.

    Luis Majano

  6. sniptools says: Jun 22, 200311:23 am

    Sounds good, Luis! Would be great if you could share a URL to your CF/template mod­i­fi­ca­tions. Thanks!

  7. Alok says: Oct 12, 20039:31 pm

    Are you plan­ning to update this code? Great stuff!

  8. Russ Jones says: Feb 08, 20047:55 am

    Fan­tas­tic prog. Just works great. How would one make it insert html from an exist­ing file. i cant see how to do that…

  9. Stewart says: Mar 03, 20048:58 am

    How would you go about insert­ing tables with the exec­Com­mand, it doesn't seem to work. Also, how would you spec­ify the execCommand("Open") to open in the iframe?

  10. Stewart says: Apr 14, 200412:00 pm

    I expanded some­what on the WYSIWYG edi­tor, and I made an option to open a file in the iFrame. It works, but you can't see the source code. The error says 'Access Denied'. Edi­tor is at http://geocities.com/albino_doom/

  11. Stewart says: May 31, 20042:06 am

    Does any­one come here any­more?
    http://semlar.com/editor.htm

Submit comment