Welcome to localhtml

Any changes made to the content of these pages is persisted when saving, and the full functionality of the document is available offline just by opening the HTML file (all the source code and state data are included in the file). You can create pages in index.html with forms which can save arbitrary data. Form controls serialise to a key matching their name property. What name you choose only matters if you want to implement your own logic with JavaScript, but every form element must have a unique name for it to be saved.

e.g. <input name="fileNameField"/> is saved to data["fileNameField"]

Users can add extra pages using the controls at the bottom of the page. These pages can only be full-page rich text editors, but can be added, removed, and rearranged at any time. You can also add rich text editors to forms, as shown here.

Each page is 1-to-1 size of US letter paper and when you print the document everything else is stripped away, so you can treat the pages just like real paper.

Did you know?

You can add content outside of a page element, but it will be excluded when printing.

You can have multiple pre-defined forms and pages, but they cannot be reordered or deleted by the user.

The data for all forms is saved as one object, so field names must be unique across all forms. However, this also means that you can move fields from one form to another without breaking backwards compatibility.

The data object is generated when needed by reading the form controls, so you can modify their values using JavaScript in all the usual ways.