Editor.Profile
Profile module for operating profiles
Methods
Editor.Profile.load (name, type, defaultProfile)
url
string - The url of the profile.defaultProfile
object - The default profile to use if the profile is not found.
Load profile viaurl
, if no profile found, it will use thedefaultProfile
and save it to the disk.You must register your profile path viaEditor.Profile.register
before you can use it.
Example:
// register a project profile
Editor.Profile.register( 'project', '~/foo/bar');
// load the profile at ~/foo/bar/foobar.json
let profile = Editor.loadProfile( 'profile://project/foobar.json', {
foo: 'foo',
bar: 'bar',
});
// change and save your profile
profile.foo = 'hello foo';
profile.save();
Editor.Profile.register (type, path)
type
string - The type of the profile you want to register.path
string - The path for the register type.
Register profiletype
with thepath
you provide.
Editor.Profile.reset ()
Reset the registered profiles