]> git.mxchange.org Git - friendica.git/blobdiff - library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
fix !@#$ tinymce linebreaks for the thousandth time
[friendica.git] / library / tinymce / jscripts / tiny_mce / plugins / bbcode / editor_plugin_src.js
index a2829a21c1cd12474a3bd9a4d433608746a702d4..f94fbc5d719b4e936d0e54224a8f9cfacef7e8da 100644 (file)
 \r
                        function rep(re, str) {\r
 \r
+\r
+s = s.replace(re,str);\r
+\r
                                //modify code to keep stuff intact within [code][/code] blocks\r
                                //Waitman Gobble NO WARRANTY\r
 \r
+/* This doesn't seem to work well with\r
+[code]line1\r
+line2[/code]\r
+commenting out for now\r
+*/\r
 \r
+/*\r
                                var o = new Array();\r
                                var x = s.split("[code]");\r
                                var i = 0;\r
@@ -71,7 +80,7 @@
                                }\r
 \r
                                s = o.join("[code]");\r
-\r
+*/\r
                        };\r
 \r
 \r
                        rep(/<blockquote[^>]*>/gi,"[quote]");\r
                        rep(/<\/blockquote>/gi,"[/quote]");\r
                        rep(/<hr \/>/gi,"[hr]");\r
-                       rep(/<br (.*?)\/>/gi,"\n\n");\r
-                       rep(/<br\/>/gi,"\n\n");\r
+                       rep(/<br (.*?)\/>/gi,"\n");\r
+                       rep(/<br\/>/gi,"\n");\r
                        rep(/<br>/gi,"\n");\r
                        rep(/<p>/gi,"");\r
                        rep(/<\/p>/gi,"\n");\r
 \r
                         function rep(re, str) {\r
 \r
+\r
                                 //modify code to keep stuff intact within [code][/code] blocks\r
                                 //Waitman Gobble NO WARRANTY\r
 \r