Skip to content

Commit c36d171

Browse files
authored
Add new installPlugin api
1 parent 59ce8e1 commit c36d171

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/global-apis/acode.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,18 @@ Later you can use the icon by adding to class name my-icon to an element.
177177

178178
### `toInternalUrl(url: string): Promise<string>`
179179

180-
When making Ajax or fetch requests, you need to convert file:// URLs to internal URLs. This method do it for you.
180+
When making Ajax or fetch requests, you need to convert file:// URLs to internal URLs. This method do it for you.
181+
182+
### `installPlugin(pluginId: string, installerPluginName: string): Promise<void>`
183+
184+
Installs an Acode plugin from registry with its id by the consent of user.
185+
186+
**Example:**
187+
188+
```js
189+
await acode.installPlugin("com.example.pluginid", "mypluin.id");
190+
```
191+
192+
:::note
193+
This api is added in `v1.10.6` , versionCode: `954`
194+
:::

0 commit comments

Comments
 (0)