X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1e71d943e17f0011d65d9e92969ff2aa3b73ff31..818b7ba3c373f6a10c70224d8650cdcbbd3bcd75:/redakcja/static/js/button_scripts.js

diff --git a/redakcja/static/js/button_scripts.js b/redakcja/static/js/button_scripts.js
index ff17eea4..6e729157 100644
--- a/redakcja/static/js/button_scripts.js
+++ b/redakcja/static/js/button_scripts.js
@@ -48,6 +48,11 @@ function ScriptletCenter()
 {
     this.scriptlets = {};
 
+    this.scriptlets['insert_text'] = function(context, params, text, move_forward, move_up, done)
+    {
+        done(params.text, move_forward, move_up);
+    }.bind(this);
+
     this.scriptlets['insert_tag'] = function(context, params, text, move_forward, move_up, done)
     {
         var padding_top = '';
@@ -282,6 +287,12 @@ function ScriptletCenter()
         done(output, move_forward, move_up);
     }.bind(this);
 
+
+    this.scriptlets['slugify'] = function(context, params, text, move_forward, move_up, done)
+    {
+        done(slugify(text.replace(/_/g, '-')), move_forward, move_up);
+    }.bind(this);
+
 }
 
 ScriptletCenter.prototype.callInteractive = function(opts) {
@@ -349,4 +360,4 @@ var scriptletCenter;
 
 $(function() {
     scriptletCenter = new ScriptletCenter();
-});
\ No newline at end of file
+});