Ever wanted to code a JavaScript content editor (script editor) web part that saves settings to a list? Without jQuery?
The library below “wp-settings.js” does exactly that with native XHR (XML HTTP Request) and nested callback to invoke REST API. The free standing POJO (Plan Old JavaScript Object) design enables us to package into a web part gallery and use freely across any site without preparation work to ensure jQuery, Angular, or other dependent frameworks are loaded.
Look at the “webpart.html” to see example usage pattern:
- wpsRead() Get settings (if any)
- wpInit() Local web part initialize
- wpsWrite() Save settings (UPDATE/INSERT)
Cheers!

Source Code
Video
Screenshots


