EditorExtensions beta
Class of @v12-engine/editor
export declare class EditorExtensionsThe extensions of an editor (editor.extensions): add(extension) puts everything of it into the editor and gives back what takes all of it away again, remove(id) does that by its id; list(), get(id), has(id)
Members
constructor
constructor(editor: EditorClient,
registry?: ExtensionRegistry);Constructs a new instance of the EditorExtensions class
add
add(extension: EditorExtension, options?: {
version?: boolean;
}): () => void;Puts an extension into the editor: its panels, tools, actions, menus, search, Inspector sections, kinds, icons, themes and layouts, then its setup. One of the same id is taken away first, and the Console says so. Gives back what takes it away
get
get(id: string): EditorExtension | undefined;The extension that was added under that id, or undefined when there is none
has
has(id: string): boolean;Whether an extension of that id is added now
list
list(): EditorExtension[];The extensions in the editor, in the order they came
onChange
onChange(listener: () => void): () => void;Told as one comes or goes. Gives back what stops it
remove
remove(id: string): void;Takes an extension away, everything it brought, by its id