# Editmode for Visual Studio Code

Editmode for VSCode is a simple plugin which adds a shortcut to your workspace, allowing you to instantly convert content inside to chunks - it will take the text, send it to the Editmode API which returns an identifier, and replace it with an Editmode helper. Used in conjunction with Editmode.js, it allows one to very quickly convert an existing site to be fully editable by anyone in a short space of time.

## Installation

Install Editmode through Visual Studio Code's Marketplace. Just open your extension manager and search for "Editmode".

## Usage

1: Once you have installed and enabled Editmode, create an empty file by the name of "em.config.json" in the root directory of your workspace.

2: Copy and paste the following into your new file;

```
{
    "em_authentication_token": "<YOUR_TOKEN_HERE>",
    "em_default_snippet_template": "react",
    "em_snippet_templates": {
      "rails_erb": "<%= chunk('{label}','{identifier}') %>",
      "react":
        "<Chunk identifier='{identifier}'>{content}</Chunk>"
    }
}
```

3: Replace the "em\_authentication\_token" with your own (this will be the authentication token for the particular project that you are working on. You can find this on your Editmode account). You may change the "em\_default\_snippet\_template" from "react" to any of the other options in the "em\_snippet\_templates" at any time.

Editmode is now ready to use!

Select the text you'd like to replace and hit CMD+SHIFT+L to convert your content to a chunk. Alternatively, you can open the Command Palette (CMD+SHIFT+P) and select "Editmode: Create Chunk".


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://editmode.gitbook.io/editmode-docs/editmode-plugins/untitled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
