}
},
openText: function (text, callback) {
+ var styleMatches = text.match(/\<style\>([^\<]*)<\/style>/);
+ var style = '';
+
+ if (styleMatches !== undefined && styleMatches !== null && styleMatches.length > 1) {
+ style = styleMatches[1].replace(/\s/g, '');
+ }
+ text = text.replace(/\<style\>([^\<]*)<\/style>/g, '');
var t = '<div class="caption">' + this.closeButton() + '<h2></h2></div>';
- t += '<div class="content"><div class="text">' + text + '</div></div>';
+ t += '<div class="content"><div class="text" style="' + style + '">' + text + '</div></div>';
$("#view").append('<div class="mview" data-menu="text">' + t + '</div>');
if (callback != undefined) {
callback();