add [img=wxh][/img] support in tinymce bbcode plugin
This commit is contained in:
parent
4a2c0fcc36
commit
af8ab8cb53
1 changed files with 5 additions and 0 deletions
|
@ -53,6 +53,10 @@
|
||||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
||||||
rep(/<span style=\"color:(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
rep(/<span style=\"color:(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
||||||
rep(/<font>(.*?)<\/font>/gi,"$1");
|
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(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
|
||||||
rep(/<code>(.*?)<\/code>/gi,"[code]$1[/code]");
|
rep(/<code>(.*?)<\/code>/gi,"[code]$1[/code]");
|
||||||
rep(/<\/(strong|b)>/gi,"[/b]");
|
rep(/<\/(strong|b)>/gi,"[/b]");
|
||||||
|
@ -96,6 +100,7 @@
|
||||||
rep(/\[\/u\]/gi,"</u>");
|
rep(/\[\/u\]/gi,"</u>");
|
||||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
||||||
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</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(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
|
||||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");
|
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");
|
||||||
// rep(/\[\/code\]\s*\[code\]/gi,"<br />"); // fold multiline code
|
// rep(/\[\/code\]\s*\[code\]/gi,"<br />"); // fold multiline code
|
||||||
|
|
Loading…
Reference in a new issue