Skip to content

Saving HTML data into localstorage? #27

Description

@samjco
    $('#btnSaveFormHTML').click(function() {
      var textToWrite = $('form#posts-filter').html();
      var textToWriteWrap = '<form id="posts-filter" method="get">'+textToWrite+'</form>';
      var textToWriteClean = textToWriteWrap.replace(/>[\n\t ]+</g, "><"); //minify
      var textFileAsBlob = new Blob([textToWriteClean], { type: 'text/html' }); //Do I need Blob?

       //..... LocalStorage code here??

   });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions