-3

I have a basic .html file i use for my homepage, it has links to various websites i visit with html and some css

Im looking to make it editable in real-time (in the browser) and making it save automatically directly to the .html file

not sure where to start?

3
  • 1
    developer.mozilla.org/en-US/docs/Web/Guide/HTML/… Commented Jul 25, 2016 at 12:30
  • Welcome to Stack Overflow. Read here for more information about how to create a Minimal, Complete and Verifiable question. Commented Jul 25, 2016 at 12:30
  • Browser don't have the ability to edit html and save it automatically since that's usually not required, and may even be a security flaw. You'll need to send requests to a server that saves the modified page. Commented Jul 25, 2016 at 12:31

2 Answers 2

2

Try in console on any page:

document.documentElement.contentEditable = true; 
Sign up to request clarification or add additional context in comments.

3 Comments

This doesn't save automatically to a HTML file though.
It's true. Use AJAX for sending data to server, for example, see jsfiddle.net/ch6yn
The question said locally not "on a remote server".
0

It is not possible to automatically save an HTML page to the client locally. However, it is possible to let the user download the current page, say, by clicking a button that says "Download." See this answer for an example of the implementation.

However, if you want to save it to the server, you can do that using AJAX requests. You will need a server-side implementation of this, not just static HTML, though.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.