Create a web-based script that allows user to edit and save a webpage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • willnt
    New Member
    • Jan 2010
    • 2

    Create a web-based script that allows user to edit and save a webpage

    Hello, I've been searching for a solution for this issue everywhere but I couldn't find anything that would work 100% for this.
    I'm trying to create a javascript that allows the user to edit and save a simple html file. Editing should be: user can choose where a header text should be placed, place pictures whenever he wants and save this HTML to be printed later.

    Does anyone know a good framework or a good javascript example that I could start developing? I really need help here, thanks in advance!
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I’m not sure this is a good idea. I’d rather have the convenience of a solid IDE.

    Comment

    • willnt
      New Member
      • Jan 2010
      • 2

      #3
      I'm sorry, what would be a "solid IDE"? I don't know what does IDE mean. Thanks again sir.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        it’s this.

        Comment

        • larztheloser
          New Member
          • Jan 2010
          • 86

          #5
          Javascript is primarily a client-side scripting language. As such it is not able to save files - you'll need a server-side language such as PHP to do that. An IDE, however, could be done in javascript. Most IDEs out there are fully-fledged HTML editors, but you seem to need nothing more than the ability to move layers around (which contain pictures and text). This shouldn't be too hard to do if you use a drag and drop interface to position everything, store the positions of the layers as variables, and then generate an HTML file. Since you only want it for printing, you should be careful to position everything so that it fits on a page. That would be the framework I would use.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Some JavaScript editors do allow for templates, so if you want to avoid rewriting something from scratch, that's one option you could consider.

            If you want something very simple, look at this (and the linked test page).

            Comment

            • larztheloser
              New Member
              • Jan 2010
              • 86

              #7
              "user can choose where a header text should be placed, place pictures whenever he wants..."

              The problem with templates is that they usually fix the position of layers, and edit the content (such as in your example). In this situation, we need to fix the content and edit the layers' position. Unless I'm confused about what willnt is exactly looking for, which is likely.

              Comment

              Working...