1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-11 13:04:28 +02:00

More TinyMce bbcode work.

This commit is contained in:
CaMer0n
2011-05-11 11:54:18 +00:00
parent a09dec0b6c
commit 0ddd1310ab
2 changed files with 11 additions and 4 deletions

View File

@@ -43,11 +43,18 @@
s = s.replace(re, str);
};
// rep(/<td>([\s\S]*?)<\/td>/gim,"[td]$1[/td]\n"); // verified
// rep(/<tr>([\s\S]*?)<\/tr>/gim,"[tr]$1[/tr]\n"); // verified
// rep(/<table>([\s\S]*?)<\/table>/gim,"[table]$1[/table]\n"); // verified
return s;
rep(/<div style="text-align: center;">([\s\S]*)<\/div>/gi,"[center]$1[/center]"); // verified
rep(/<li>/gi,"*"); // verified
rep(/<li>/gi,"[*]"); // verified
rep(/<\/li>/gi,""); // verified
rep(/<ul>([\s\S]*?)<\/ul>/gim,"[list]$1[/list]\n"); // verified
rep(/<ol .* style=\'list-style-type:\s*([\w]*).*\'>([\s\S]*)<\/ol>/gim,"[list=$1]$2[/list]\n"); // verified
@@ -118,7 +125,7 @@
rep(/(\[list=.*\])\\*([\s\S]*)(\[\/list])/gim,"<ol>$2</ol>"); // verified
rep(/(\[list\])\\*([\s\S]*)(\[\/list])/gim,"<ul>$2</ul>");// verified
rep(/^ *?\*(.*)/gim,"<li>$1</li>");
rep(/^ *?\[\*\](.*)/gim,"<li>$1</li>");
rep(/\[center\]([\s\S]*)\[\/center\]/gi,"<div style=\"text-align:center\">$1</div>"); // verified
rep(/\[color=(.*?)\]([\s\S]*)\[\/color\]/gi,"<span style=\"color: $1;\">$2<\/span>"); // verified