/* oembed */
function _h2b_cb(match) {
- text = bin2hex(match);
function s_h2b(data) {
match = data;
- }
- $.ajax({
- url: 'oembed/h2b?text=' + text,
+ }\r
+ $.ajax({\r
+ type:"POST",
+ url: 'oembed/h2b',\r
+ data: {text: match},
async: false,
success: s_h2b,
dataType: 'html'
});
return match;
}
- s = s.replace(/<span class=\"oembed(.*?)<\/span>/gi, _h2b_cb);
+ if (s.indexOf('class="oembed')>=0){\r
+ //alert("request oembed html2bbcode");\r
+ s = _h2b_cb(s);\r
+ }\r
+
/* /oembed */
\r
\r
// Register plugin\r
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);\r
-})();
\ No newline at end of file
+})();\r