From 5589bca1e031517cc440c7f2896f107dbb57296e Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Jul 2012 17:15:43 -0700 Subject: fix !@#$ tinymce linebreaks for the thousandth time --- library/mcefixes/plugins.bbcode.editor_plugin_src.js | 16 +++++++++++++--- .../tiny_mce/plugins/bbcode/editor_plugin_src.js | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'library') diff --git a/library/mcefixes/plugins.bbcode.editor_plugin_src.js b/library/mcefixes/plugins.bbcode.editor_plugin_src.js index a2829a21c..f94fbc5d7 100644 --- a/library/mcefixes/plugins.bbcode.editor_plugin_src.js +++ b/library/mcefixes/plugins.bbcode.editor_plugin_src.js @@ -46,10 +46,19 @@ function rep(re, str) { + +s = s.replace(re,str); + //modify code to keep stuff intact within [code][/code] blocks //Waitman Gobble NO WARRANTY +/* This doesn't seem to work well with +[code]line1 +line2[/code] +commenting out for now +*/ +/* var o = new Array(); var x = s.split("[code]"); var i = 0; @@ -71,7 +80,7 @@ } s = o.join("[code]"); - +*/ }; @@ -150,8 +159,8 @@ rep(/]*>/gi,"[quote]"); rep(/<\/blockquote>/gi,"[/quote]"); rep(/
/gi,"[hr]"); - rep(/
/gi,"\n\n"); - rep(//gi,"\n\n"); + rep(/
/gi,"\n"); + rep(//gi,"\n"); rep(/
/gi,"\n"); rep(/

/gi,""); rep(/<\/p>/gi,"\n"); @@ -171,6 +180,7 @@ function rep(re, str) { + //modify code to keep stuff intact within [code][/code] blocks //Waitman Gobble NO WARRANTY diff --git a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js index a2829a21c..f94fbc5d7 100644 --- a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -46,10 +46,19 @@ function rep(re, str) { + +s = s.replace(re,str); + //modify code to keep stuff intact within [code][/code] blocks //Waitman Gobble NO WARRANTY +/* This doesn't seem to work well with +[code]line1 +line2[/code] +commenting out for now +*/ +/* var o = new Array(); var x = s.split("[code]"); var i = 0; @@ -71,7 +80,7 @@ } s = o.join("[code]"); - +*/ }; @@ -150,8 +159,8 @@ rep(/]*>/gi,"[quote]"); rep(/<\/blockquote>/gi,"[/quote]"); rep(/


/gi,"[hr]"); - rep(/
/gi,"\n\n"); - rep(//gi,"\n\n"); + rep(/
/gi,"\n"); + rep(//gi,"\n"); rep(/
/gi,"\n"); rep(/

/gi,""); rep(/<\/p>/gi,"\n"); @@ -171,6 +180,7 @@ function rep(re, str) { + //modify code to keep stuff intact within [code][/code] blocks //Waitman Gobble NO WARRANTY -- cgit v1.2.3