Create an array of categories from comma-seperated text input
That same operation can be streamlined into:

var categoriesJoined = event.target.category.value
  .split(',')
  .map(function(category){ return category.trim(); })
  .filter(function(category){ return !!category; })
  .concat(['Inbox']);


or Inbox first:

var categoriesJoined = ['Inbox'].concat(event.target.category.value
  .split(',')
  .map(function(category){ return category.trim(); })
  .filter(function(category){ return !!category; }))



We split first by , giving us access to an array.
We clean up each item using map by returning a cleaned value using trim
Then filter out those who are totally whitespace (they end up as blanks when trimmed).
Add in "Inbox".