Updated API tests.
[redakcja.git] / project / templates / toolbar_api / scriptlets.js
diff --git a/project/templates/toolbar_api/scriptlets.js b/project/templates/toolbar_api/scriptlets.js
new file mode 100644 (file)
index 0000000..ae7e2df
--- /dev/null
@@ -0,0 +1,15 @@
+function SciptletCenter() {
+
+    this.scriptlets = {
+        {% for scriptlet in scriptlets %}
+        "{{scriptlet.name}}": function(context, params) {
+            {{scriptlet.code|safe}}
+        },
+        {% endfor %}
+
+        _none: null
+    };
+            
+}
+
+scriptletCenter = new ScriptletCenter();
\ No newline at end of file