2 Roo.rtf.Group = function(parent)
4 // we dont want to acutally store parent - it will make debug a nightmare..
12 Roo.rtf.Group.prototype = {
16 addContent : function(node) {
17 // could set styles...
18 this.content.push(node);
20 addChild : function(cn)
24 // only for images really...
25 toDataURL : function()
29 case this.content.filter(function(a) { return a.value == 'pngblip' } ).length > 0:
30 mimetype = "image/png";
32 case this.content.filter(function(a) { return a.value == 'jpegblip' } ).length > 0:
33 mimetype = "image/jpeg";
36 return 'about:blank'; // ?? error?
40 var hexstring = this.content[this.content.length-1].value;
42 return 'data:' + mimetype + ';base64,' + btoa(hexstring.match(/\w{2}/g).map(function(a) {
43 return String.fromCharCode(parseInt(a, 16));