diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-01-26 16:19:40 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-01-26 16:19:40 +0100 |
commit | af8ab8cb5350a503bb4043e90484a2bece3de7b4 (patch) | |
tree | 0000c1445e029c50a0d584713dd0168d0ccd33b1 /tinymce/jscripts/tiny_mce | |
parent | 4a2c0fcc36695c70c70a83ac04a8cb25f28b02d2 (diff) | |
download | volse-hubzilla-af8ab8cb5350a503bb4043e90484a2bece3de7b4.tar.gz volse-hubzilla-af8ab8cb5350a503bb4043e90484a2bece3de7b4.tar.bz2 volse-hubzilla-af8ab8cb5350a503bb4043e90484a2bece3de7b4.zip |
add [img=wxh][/img] support in tinymce bbcode plugin
Diffstat (limited to 'tinymce/jscripts/tiny_mce')
-rw-r--r-- | tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js | 5 |
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
|