Some of the code shown in this video comes from a blog post entitled Build Custom Web Part Properties with JSOM by Rachid Bouzalmat. I was on a similar path before seeing Rachid’s post. My biggest hurdle was trying to figure out a good way to persist the property values. His idea of using the native persistence model of the script editor web part was a brilliant one so I adopted it for my framework.
Advanced SharePoint WebPart Development