Skip to main content

EditorApi API

Editor API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
getEditorConfigRetrieves the current editor configuration.
getTreeRetrieves the hierarchical file tree for a workspace project.

Methods


getEditorConfig

client.editorApi.getEditorConfig(): Promise<EditorConfig>

Retrieves the current editor configuration.

Returns settings that control editor behavior such as theme, font size, tab width, and other preferences. Useful for synchronizing editor state across components or persisting user preferences.

No parameters.

Returns: Promise<EditorConfig> — A promise that resolves to the current

Full reference →


getTree

client.editorApi.getTree(workspaceId: string, projectName: string): Promise<EditorTreeNode>

Retrieves the hierarchical file tree for a workspace project.

Returns a nested tree structure representing all files and directories within the specified project. Useful for rendering file explorers or programmatically traversing project contents.

ParameterTypeRequiredDescription
workspaceIdstringYesThe unique identifier of the workspace containing the project
projectNamestringYesThe name of the project whose file tree to retrieve

Returns: Promise<EditorTreeNode> — A promise that resolves to the root with nested children

Full reference →