Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow import of existing index.html files #1

Open
chriskthomas opened this issue Jun 5, 2023 · 4 comments
Open

Allow import of existing index.html files #1

chriskthomas opened this issue Jun 5, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@chriskthomas
Copy link
Owner

Right now, there is no way to import an index.html file to automatically fill the fields. I would like to rectify this. It is fine if the importation is not backwards compatible. I am thinking that the simplest way to do it is to store all of the text fields in json as a comment at the bottom of the document.

This json could then be imported when the index.html file is imported.

@chriskthomas chriskthomas added the help wanted Extra attention is needed label Jun 5, 2023
@chriskthomas
Copy link
Owner Author

Likely depends on #4 as the import option could just set the localStorage keys and refresh.

@officialxndr
Copy link

Is this something we'd want to sort through the index and pull all related links to fill the fields? would the index.html be from someone's webpage or specifically built just for the auto import?

@chriskthomas
Copy link
Owner Author

Is this something we'd want to sort through the index and pull all related links to fill the fields?

Yes!

would the index.html be from someone's webpage or specifically built just for the auto import?

The later. My thought was that the page builder could insert an html comment after the closing html. We then put a json string inside the comment with the exact JavaScript object that we want for the import.

When the page is imported, this json in the comment is read and we can loop through the entries to fill the form.

@chriskthomas
Copy link
Owner Author

So, this consists of two steps:

  1. Add comment json object to api.php
  2. Add import option to index.js / index.php

Step 2 should probably be done in js and html without using php to process any inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants