Gets an editor property value.
.get(/* String */ propertyName)
The name of the editor property to be retrieved. Property names are listed here.
editor = new window.__editor(undefined, document.getElementById('editor-node'));
editor.startup();
// Load user preference data from the app's database
var userDataString = loadUserPreferences();
// Parse the preference data string to a JS object
var userData = JSON.parse(userDataString);
// Set the editor's preferences property
editor.set('preferences', userData);
In code that runs after the editor is closed:
// Retrieve user data from the editor
var userData = editor.get('preferences');
// Stringify and persist the user's preference data
storeUserPreferences(JSON.stringify(userData));
This example assumes the application implements function storeUserPreferences to store user preferences, and function loadUserPreferences to retrieve user preference data.