aboutsummaryrefslogtreecommitdiffstats
path: root/tinymce/jscripts
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-23 16:29:30 -0800
committerFriendika <info@friendika.com>2011-01-23 16:29:30 -0800
commit00d2b583588ea1c55e9b478809e8041d6ba98639 (patch)
tree07ad38acb1beae1bce4bc56416cc64c8ad95abc8 /tinymce/jscripts
parent1460fc0d710ce14d6c746eb06fc8f3a5372493c2 (diff)
downloadvolse-hubzilla-00d2b583588ea1c55e9b478809e8041d6ba98639.tar.gz
volse-hubzilla-00d2b583588ea1c55e9b478809e8041d6ba98639.tar.bz2
volse-hubzilla-00d2b583588ea1c55e9b478809e8041d6ba98639.zip
fix a few issues with code blocks, ignore tags within blocks, fold multi-line blocks to one, also turn html br into two LFs.
Diffstat (limited to 'tinymce/jscripts')
-rw-r--r--tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js5
-rw-r--r--tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css12
2 files changed, 15 insertions, 2 deletions
diff --git a/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
index 8728f0c0f..f12975ba2 100644
--- a/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
+++ b/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
@@ -64,8 +64,8 @@
rep(/<u>/gi,"[u]");
rep(/<blockquote[^>]*>/gi,"[quote]");
rep(/<\/blockquote>/gi,"[/quote]");
- rep(/<br \/>/gi,"\n");
- rep(/<br\/>/gi,"\n");
+ rep(/<br \/>/gi,"\n\n");
+ rep(/<br\/>/gi,"\n\n");
rep(/<br>/gi,"\n");
rep(/<p>/gi,"");
rep(/<\/p>/gi,"\n");
@@ -98,6 +98,7 @@
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");
+// rep(/\[\/code\]\s*\[code\]/gi,"<br />"); // fold multiline code
rep(/\[code\](.*?)\[\/code\]/gi,"<code>$1</code>");
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<blockquote>$1</blockquote>");
diff --git a/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css b/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css
index 36f38aba2..444063a82 100644
--- a/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css
+++ b/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css
@@ -18,6 +18,18 @@ del {color:red; text-decoration:line-through}
cite {border-bottom:1px dashed blue}
acronym {border-bottom:1px dotted #CCC; cursor:help}
abbr {border-bottom:1px dashed #CCC; cursor:help}
+code {
+ font-family: Courier, monospace;
+ white-space: pre;
+ display: block;
+ overflow: auto;
+ border: 1px solid #444;
+ background: #EEE;
+ color: #444;
+ padding: 10px;
+ margin-top: 20px;
+}
+
/* IE */
* html body {