aboutsummaryrefslogtreecommitdiffstats
path: root/tinymce
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-26 13:59:20 -0800
committerFriendika <info@friendika.com>2011-01-26 13:59:20 -0800
commit05350082fab123a1ba01340d3fef95f4edf6fb5b (patch)
tree82c1a04931b1942a2067d2cf60a26f96e127306c /tinymce
parentc3691b3331d4aa26ff7fb1294b7ef5218aa241ec (diff)
parent43be72297a281b41e7b77ba6078aeb48ee007299 (diff)
downloadvolse-hubzilla-05350082fab123a1ba01340d3fef95f4edf6fb5b.tar.gz
volse-hubzilla-05350082fab123a1ba01340d3fef95f4edf6fb5b.tar.bz2
volse-hubzilla-05350082fab123a1ba01340d3fef95f4edf6fb5b.zip
Merge branch 'oembed' of https://github.com/fabrixxm/friendika into fabrixxm-oembed
Diffstat (limited to 'tinymce')
-rw-r--r--tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js5
1 files changed, 5 insertions, 0 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 f12975ba2..ebccfb311 100644
--- a/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
+++ b/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
@@ -53,6 +53,10 @@
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
rep(/<span style=\"color:(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
rep(/<font>(.*?)<\/font>/gi,"$1");
+ rep(/<img.*?width=\"(.*?)\".*?height=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$1x$2]$3[/img]");
+ rep(/<img.*?height=\"(.*?)\".*?width=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$2x$1]$3[/img]");
+ rep(/<img.*?src=\"(.*?)\".*?height=\"(.*?)\".*?width=\"(.*?)\".*?\/>/gi,"[img=$3x$2]$1[/img]");
+ rep(/<img.*?src=\"(.*?)\".*?width=\"(.*?)\".*?height=\"(.*?)\".*?\/>/gi,"[img=$2x$3]$1[/img]");
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
rep(/<code>(.*?)<\/code>/gi,"[code]$1[/code]");
rep(/<\/(strong|b)>/gi,"[/b]");
@@ -96,6 +100,7 @@
rep(/\[\/u\]/gi,"</u>");
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
+ rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,"<img width=\"$1\" height=\"$2\" src=\"$3\" />");
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