How can I save user input in my chrome extension?

I’m making a Chrome countdown clock extension and I want to save the user input in javascript, is there anyway to do this?

here is the code,

var userInput = prompt ("Enter Your Date");
var countDownDate = new Date(userInput).getTime();

How to allow text selection as user input in a Chrome extension?

I am building a Chrome Extension that saves information from websites. You can see it as a notebook where I want to save snippets of webpages.

Each note has two parts : a title and a body. I want the user to be able to :
1. select text from the webpage for both the title and the body
2. type in manually both the title and the body

I was able to create a contextMenu item that allows me to create a note from selected text, but this does not allow the user to select the title as well. I am guessing I will have to use the browser action icon to promt selection for the title and the body (two separate actions), but I don’t know where to start.