Some widgets could provide advanced editing capabilities, such as a video widget allowing video editing or a H5P widget that can install H5P content types locally.
Specification by developers
The mechanism to specify advanced editing capabilities is to create a second entry point file edit.ts, additional to the standard entry point index.ts. Using the "exports" field, the developer can map the edit.ts file to my-widget/edit such that it can be imported with import MyWidget from "my-widget/edit".
Some widgets could provide advanced editing capabilities, such as a video widget allowing video editing or a H5P widget that can install H5P content types locally.
Specification by developers The mechanism to specify advanced editing capabilities is to create a second entry point file
edit.ts
, additional to the standard entry pointindex.ts
. Using the"exports"
field, the developer can map theedit.ts
file tomy-widget/edit
such that it can be imported withimport MyWidget from "my-widget/edit"
.my-widget/package.json
The main entrypoint should contain the normal widget with no dependency on the editing entry point.
my-widget/index.ts
The "edit" entrypoint can depend on the main entrypoint.
my-widget/edit.ts
Editing by teachers The editor automatically imports the editing widget from the edit entrypoint.
Usage by students None