mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-01 07:56:48 +00:00
Add highlight plugin to /dev wiki
This commit is contained in:
@@ -8,7 +8,7 @@ title: Module System
|
||||
After the boot kernel provides the functions used to load tiddlers, the rest of the TiddlyWiki application is loaded as modules.
|
||||
A module is a tiddler which has the type ``application/javascript`` and contains CommonJS compatible JavaScript code. This means a single module provides its public structures and functions in a variable called ``export``. Other modules can obtain these structures and functions by using a global ``require`` function.
|
||||
|
||||
```
|
||||
```js
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
// ...
|
||||
ButtonWidget.prototype = new Widget();
|
||||
|
||||
Reference in New Issue
Block a user