I think it's important to note that even if was a HTMLInputElement you would still keep getting undefined because your div,
Has no value attribute, here is an example of a div with a value attribute:
However, as mentioned in other answers, even though you have entered a value it, .value will still return undefined because is a HTML element and not a HTMLInputElement.
If you really need to store some information in the value of the div you can always do something like this:
Right after the div loads, you force 'hello' as the value.
The only reason you'd do this is if you really want to store data within the div's value and can't store it within the innerHTML because the div is visible.
If you want to store the information within your div like this:
all the information i want to store
Then document.getElementById('editor').innerHTML; is the correct solution, but remember that users will be able to see the information on the webpage.