Sets an editor property value.
.set(/* String */ propertyName, propertyValue)
The name of the editor property to be set. Property names are listed here.
The property's new value. See the property's documentation page for the propertyValue argument's data type.
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);
This example assumes that the application implements function loadUserPreferences to retrieve persisted user preference data.