Editor.Profile

Profile module for operating profiles

Methods

Editor.Profile.load (name, type, defaultProfile)

Load profile via url, if no profile found, it will use the defaultProfile and save it to the disk. You must register your profile path via Editor.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)

Register profile type with the path you provide.

Editor.Profile.reset ()

Reset the registered profiles

IPC Message

Message: 'editor:load-profile'

Message: 'editor:save-profile'