From 6a9432c725efb9f313282c7ca8ce954ea9be8c75 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 9 Dec 2013 11:30:32 +0100 Subject: editor_plugin_src.js compressed at jscompress.com --- library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/tinymce/jscripts/tiny_mce/plugins/bbcode') diff --git a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js index 8f8821fd6..81b69e736 100644 --- a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/(.*?)<\/font>/gi,"$1");b(//gi,"[img]$1[/img]");b(/(.*?)<\/span>/gi,"[code]$1[/code]");b(/(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/(.*?)<\/span>/gi,"[u]$1[/u]");b(//gi,"[u]");b(/]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/
/gi,"\n");b(//gi,"\n");b(/
/gi,"\n");b(/

/gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"
");b(/\[b\]/gi,"");b(/\[\/b\]/gi,"");b(/\[i\]/gi,"");b(/\[\/i\]/gi,"");b(/\[u\]/gi,"");b(/\[\/u\]/gi,"");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');b(/\[url\](.*?)\[\/url\]/gi,'$1');b(/\[img\](.*?)\[\/img\]/gi,'');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');b(/\[code\](.*?)\[\/code\]/gi,'$1 ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(e,t){var n=this,r=e.getParam("bbcode_dialect","dfrn").toLowerCase();e.onBeforeSetContent.add(function(e,t){t.content=n["_"+r+"_bbcode2html"](t.content)});e.onPostProcess.add(function(e,t){if(t.set)t.content=n["_"+r+"_bbcode2html"](t.content);if(t.get)t.content=n["_"+r+"_html2bbcode"](t.content)})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_dfrn_html2bbcode:function(e){function t(t,n){e=e.replace(t,n)}function n(e){var t,n,r=[],i=[];var s=/]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:]*>(.*?)<\/span *>)*.*?)<\/span *>/ig;while(t=s.exec(e)){var o=/]* rel=[\"']oembed[\"'][^>]*)>.*?<\/a *>/ig;if(n=o.exec(t[1])){var u=/href=[\"']([^\"']*)[\"']/ig;var a=u.exec(n[1]);if(a[1]){r.push(t[0]);i.push("[EMBED]"+a[1]+"[/EMBED]")}}}for(var f=0;f=0){e=n(e)}t(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");t(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");t(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");t(/(.*?)<\/font>/gi,"$1");t(//gi,"[img=$1x$2]$3[/img]");t(//gi,"[img=$2x$1]$3[/img]");t(//gi,"[img=$3x$2]$1[/img]");t(//gi,"[img=$2x$3]$1[/img]");t(//gi,"[img]$1[/img]");t(/

    (.*?)<\/ul>/gi,"[list]$1[/list]");t(/
      (.*?)<\/ul>/gi,"[list=]$1[/list]");t(/
        (.*?)<\/ul>/gi,"[list=1]$1[/list]");t(/
          (.*?)<\/ul>/gi,"[list=i]$1[/list]");t(/
            (.*?)<\/ul>/gi,"[list=I]$1[/list]");t(/
              (.*?)<\/ul>/gi,"[list=a]$1[/list]");t(/
                (.*?)<\/ul>/gi,"[list=A]$1[/list]");t(/
              • (.*?)<\/li>/gi,"[li]$1[/li]");t(/(.*?)<\/code>/gi,"[code]$1[/code]");t(/<\/(strong|b)>/gi,"[/b]");t(/<(strong|b)>/gi,"[b]");t(/<\/(em|i)>/gi,"[/i]");t(/<(em|i)>/gi,"[i]");t(/<\/u>/gi,"[/u]");t(/(.*?)<\/span>/gi,"[u]$1[/u]");t(//gi,"[u]");t(/]*>/gi,"[quote]");t(/<\/blockquote>/gi,"[/quote]");t(/
                /gi,"[hr]");t(/
                /gi,"\n");t(//gi,"\n");t(/
                /gi,"\n");t(/

                /gi,"");t(/<\/p>/gi,"\n");t(/ /gi," ");t(/"/gi,'"');t(/</gi,"<");t(/>/gi,">");t(/&/gi,"&");return e},_dfrn_bbcode2html:function(e){function t(t,n){var r=new Array;var i=e.split("[code]");var o=0;var u="";u=i.shift();u=u.replace(t,n);r.push(u);for(o=0;o");t(/\[b\]/gi,"");t(/\[\/b\]/gi,"");t(/\[i\]/gi,"");t(/\[\/i\]/gi,"");t(/\[u\]/gi,"");t(/\[\/u\]/gi,"");t(/\[hr\]/gi,"


                ");t(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');t(/\[url\](.*?)\[\/url\]/gi,'$1');t(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,'');t(/\[img\](.*?)\[\/img\]/gi,'');t(/\[list\](.*?)\[\/list\]/gi,'
                  $1
                ');t(/\[list=\](.*?)\[\/list\]/gi,'
                  $1
                ');t(/\[list=1\](.*?)\[\/list\]/gi,'
                  $1
                ');t(/\[list=i\](.*?)\[\/list\]/gi,'
                  $1
                ');t(/\[list=I\](.*?)\[\/list\]/gi,'
                  $1
                ');t(/\[list=a\](.*?)\[\/list\]/gi,'
                  $1
                ');t(/\[list=A\](.*?)\[\/list\]/gi,'
                  $1
                ');t(/\[li\](.*?)\[\/li\]/gi,"
              • $1
              • ");t(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');t(/\[size=(.*?)\](.*?)\[\/size\]/gi,'$2');t(/\[code\](.*?)\[\/code\]/gi,"$1");t(/\[quote.*?\](.*?)\[\/quote\]/gi,"
                $1
                ");e=e.replace(/\[embed\](.*?)\[\/embed\]/gi,n);return e}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})() -- cgit v1.2.3