Sha256: 30477f7fe5e6e200035bbfcf5d8352cd2504d86673d649c0df22c48eea1e07f7
Contents?: true
Size: 1.23 KB
Versions: 15
Compression:
Stored size: 1.23 KB
Contents
(function(a){a.plugins.BBCode=function(b){b.onGetContent.add(function(c,d){if(d.format=="bbcode"||d.save){a.each([[/<a href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"],[/<font.*?color=\"([^\"]+)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"],[/<img.*?src=\"([^\"]+)\".*?\/>/gi,"[img]$1[/img]"],[/<(br\s*\/)>/gi,"\n"],[/<(\/?)(strong|b)[^>]*>/gi,"[$1b]"],[/<(\/?)(em|i)[^>]*>/gi,"[$1i]"],[/<(\/?)u[^>]*>/gi,"[$1u]"],[/<(\/?)(code|pre)[^>]*>/gi,"[$1code]"],[/<(\/?)(span.*?class=\"quote\")[^>]*>(.*?)<\/span>/gi,"[$1quote]$3[/quote]"],[/<p>/gi,""],[/<\/p>/gi,"\n"],[/"/gi,'"'],[/</gi,"<"],[/>/gi,">"],[/&/gi,"&"],[/<[^>]+>/gi,""]],function(e){d.content=d.content.replace(e[0],e[1])})}});b.onSetContent.add(function(c,d){if(d.format=="bbcode"||d.load){a.each([[/\n/gi,"<br />"],[/\[(\/?)b\]/gi,"<$1strong>"],[/\[(\/?)i\]/gi,"<$1em>"],[/\[(\/?)u\]/gi,"<$1u>"],[/\[(\/?)code\]/gi,"<$1pre>"],[/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'],[/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'],[/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'],[/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'],[/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quote">$1</span>']],function(e){d.content=d.content.replace(e[0],e[1])})}})}})(punymce);
Version data entries
15 entries across 15 versions & 1 rubygems