set
set Method
Description
Sets an editor property value.
.set(/* String */ propertyName, propertyValue)
Parameters
propertyName
String
The name of the editor property to be set. Property names are listed here.
propertyValue
The new value of the property. See the documentation for the property for more information.
Example
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);
Note: This example assumes the integrator implements the function loadUserPreferences
to retrieve user’s
preferences
data. The integrator will need to implement this function to retrieve data from the data store appropriate to their
application.