@univerjs/uniscript
Introduction
@univerjs/uniscript
uses the DSL (Domain-Specific Language) provided by @univerjs/facade
and creates a code editor for Users to write code for operating Univer’s data structures and business logic.
Users can write business logic in the code editor to meet more flexible business requirements. For instance, as shown in the illustration, users can write a Uniscript to read identity card numbers from a selected area and validate their legality, and mark the background of invalid identity card numbers with red.
Usage
Installation
Get the Editor Instance
The @univerjs/uniscript
uses Monaco Editor as its code editor. You can obtain an instance of the editor through the following method:
Or inject ScriptEditorService
into your module to obtain the editor instance.