📄️ Get started
This page is for the developers that want to learn how to make an extension. Before you start, please ensure that you have the basic knowledge of Javascript programming.
This page is for the developers that want to learn how to make an extension. Before you start, please ensure that you have the basic knowledge of Javascript programming.
This tutorial will illustrate the basic process of writing ClipCC extensions by demonstrating the writing of a simple extension.
In the previous page, We demonstrate how to create an extension. Now, we're going to demonstrate exactly how the extension works.
Dependencies
This page describes how to add a block to the editor.
Add/remove blocks in one times.
Translatation file
You can interact with the editor by using the `api.getXXXInstance()`
Interaction between extensions is achieved by exposing a function, where a member function of the extension prototype is exposed using the `registerGlobalFunction function, allowing other extensions to call it via the callGlobalFunction` function. Note that getting an instance of an extension directly in another extension is also not prohibited, but results in undefined behavior.
Settings are defined in the `settings.json` file in the internal root of the extension file and are used to add settings to the editor. All settings of the extension are added to the editor when the extension is loaded, not when it is enabled. That is, the user can modify the extension's settings while the extension is not enabled.
The following extension APIs are in draft and the following are subject to change in the future.